Compare commits

...

91 Commits

Author SHA1 Message Date
Kinco aa896cb47b
test(lifecycle): add unit tests for lifecycle utils and improve nil-checks (#2143)
Signed-off-by: kincoy <1152072645@qq.com>
2025-09-03 19:07:32 +08:00
dependabot[bot] c3f7a3a713
chore(deps): bump ruby/setup-ruby from 1.245.0 to 1.256.0 (#2172)
Bumps [ruby/setup-ruby](https://github.com/ruby/setup-ruby) from 1.245.0 to 1.256.0.
- [Release notes](https://github.com/ruby/setup-ruby/releases)
- [Changelog](https://github.com/ruby/setup-ruby/blob/master/release.rb)
- [Commits](a4effe49ee...efbf473cab)

---
updated-dependencies:
- dependency-name: ruby/setup-ruby
  dependency-version: 1.256.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-26 14:47:20 +08:00
dependabot[bot] 0f842f8919
chore(deps): bump codecov/codecov-action from 5.4.3 to 5.5.0 (#2171)
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 5.4.3 to 5.5.0.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](18283e04ce...fdcc847654)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-version: 5.5.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-26 10:12:47 +08:00
dependabot[bot] a2255989ad
chore(deps): bump actions/cache from 4.2.0 to 4.2.4 (#2159)
Bumps [actions/cache](https://github.com/actions/cache) from 4.2.0 to 4.2.4.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](1bd1e32a3b...0400d5f644)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-version: 4.2.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-18 13:56:05 +08:00
dependabot[bot] 0a631d82f7
chore(deps): bump crate-ci/typos from 1.32.0 to 1.35.3 (#2158)
Bumps [crate-ci/typos](https://github.com/crate-ci/typos) from 1.32.0 to 1.35.3.
- [Release notes](https://github.com/crate-ci/typos/releases)
- [Changelog](https://github.com/crate-ci/typos/blob/master/CHANGELOG.md)
- [Commits](0f0ccba9ed...52bd719c2c)

---
updated-dependencies:
- dependency-name: crate-ci/typos
  dependency-version: 1.35.3
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-18 13:50:54 +08:00
Parship Chowdhury f447109bad
added unit test for container_launch_priority (#2119)
Signed-off-by: Parship Chowdhury <i.am.parship@gmail.com>
2025-08-18 13:28:41 +08:00
dependabot[bot] 3958601a32
chore(deps): bump github/codeql-action from 3.29.0 to 3.29.8 (#2157)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.29.0 to 3.29.8.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](ce28f5bb42...76621b61de)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 3.29.8
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-18 12:56:55 +08:00
Zhen Zhang 6d49ba5eca
update ginkgo to v2 (#2160)
Signed-off-by: 守辰 <shouchen.zz@alibaba-inc.com>
2025-08-18 10:05:18 +08:00
berg 9ccaa15ae8
fix PodProbeMarker TCP Probe failure due to empty IP address. (#2162)
Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>
2025-08-15 15:19:12 +08:00
berg 694f167537
fix corner case caused by continuous upgrades of sidecarSet hot upgrades (#2156)
Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>
2025-08-14 15:26:34 +08:00
7h3-3mp7y-m4n 8ff20ad150
add test for webhook/util (#2138)
* add test for webhook/util and fix date logic

Signed-off-by: 7h3-3mp7y-m4n <emailtorash@gmail.com>
2025-08-12 17:40:50 +08:00
PulkitDadwal 6bc00ac6ba
fixed a typo in YYYYMMDD-template.md (#2134)
* incorrect path to docs/enhancements is now fixed

Signed-off-by: PulkitDadwal <150671733+PulkitDadwal@users.noreply.github.com>
2025-08-05 09:25:52 +08:00
7h3-3mp7y-m4n efb4978f2f
add test for pkg/util/specifieddelete (#2142)
Signed-off-by: 7h3-3mp7y-m4n <emailtorash@gmail.com>
2025-08-04 19:02:05 +08:00
Parship Chowdhury e258de4548
Add unit test for parse (#2128)
* added unit test for parse

Signed-off-by: Parship Chowdhury <i.am.parship@gmail.com>

* fix ut issues

Signed-off-by: Parship Chowdhury <i.am.parship@gmail.com>

* added the username and password validation

Signed-off-by: Parship Chowdhury <i.am.parship@gmail.com>

---------

Signed-off-by: Parship Chowdhury <i.am.parship@gmail.com>
2025-07-29 17:10:00 +08:00
Parship Chowdhury 5408631390
latest envtest binary (#2125)
Signed-off-by: Parship Chowdhury <i.am.parship@gmail.com>
2025-07-25 16:57:56 +08:00
Parship Chowdhury b74b675c5f
Add unit test for `pkg/util/finalizer.go` (#2117)
* added unit test for finalizer

Signed-off-by: Parship Chowdhury <i.am.parship@gmail.com>

* empty finalizer names should return an error

Signed-off-by: Parship Chowdhury <i.am.parship@gmail.com>

---------

Signed-off-by: Parship Chowdhury <i.am.parship@gmail.com>
2025-07-24 19:20:55 +08:00
Parship Chowdhury 84eb758b03
added unit test for requeueduration/duration (#2118)
Signed-off-by: Parship Chowdhury <i.am.parship@gmail.com>
2025-07-23 19:11:55 +08:00
berg f6e5215fe0
changelog 1.8.2 (#2116)
Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>
2025-07-22 20:14:20 +08:00
Ai Ranthem 33cd2c5105
Feature: Reservation Reschedule for UnitedDeployment Adaptive Strategy (#1941)
* Feature: Temporary reschedule for UnitedDeployment Adaptive strategy

Signed-off-by: AiRanthem <zhongtianyun.zty@alibaba-inc.com>

* Feature: Temporary reschedule for UnitedDeployment Adaptive strategy

Signed-off-by: AiRanthem <zhongtianyun.zty@alibaba-inc.com>

* Feature: Temporary reschedule for UnitedDeployment Adaptive strategy

Signed-off-by: AiRanthem <zhongtianyun.zty@alibaba-inc.com>

* Feature: Temporary reschedule for UnitedDeployment Adaptive strategy

Signed-off-by: AiRanthem <zhongtianyun.zty@alibaba-inc.com>

* Feature: Temporary reschedule for UnitedDeployment Adaptive strategy

Signed-off-by: AiRanthem <zhongtianyun.zty@alibaba-inc.com>

* Feature: Temporary reschedule for UnitedDeployment Adaptive strategy

Signed-off-by: AiRanthem <zhongtianyun.zty@alibaba-inc.com>

* Feature: Temporary reschedule for UnitedDeployment Adaptive strategy

Signed-off-by: AiRanthem <zhongtianyun.zty@alibaba-inc.com>

* Feature: Temporary reschedule for UnitedDeployment Adaptive strategy

Signed-off-by: AiRanthem <zhongtianyun.zty@alibaba-inc.com>

* Feature: Temporary reschedule for UnitedDeployment Adaptive strategy

Signed-off-by: AiRanthem <zhongtianyun.zty@alibaba-inc.com>

* Feature: Temporary reschedule for UnitedDeployment Adaptive strategy

Signed-off-by: AiRanthem <zhongtianyun.zty@alibaba-inc.com>

* Feature: Temporary reschedule for UnitedDeployment Adaptive strategy

Signed-off-by: AiRanthem <zhongtianyun.zty@alibaba-inc.com>

* Feature: Temporary reschedule for UnitedDeployment Adaptive strategy

Signed-off-by: AiRanthem <zhongtianyun.zty@alibaba-inc.com>

* Feature: Temporary reschedule for UnitedDeployment Adaptive strategy

Signed-off-by: AiRanthem <zhongtianyun.zty@alibaba-inc.com>

* Feature: Temporary reschedule for UnitedDeployment Adaptive strategy

Signed-off-by: AiRanthem <zhongtianyun.zty@alibaba-inc.com>

* Feature: Temporary reschedule for UnitedDeployment Adaptive strategy

Signed-off-by: AiRanthem <zhongtianyun.zty@alibaba-inc.com>

* Feature: Temporary reschedule for UnitedDeployment Adaptive strategy

Signed-off-by: AiRanthem <zhongtianyun.zty@alibaba-inc.com>

* Feature: Temporary reschedule for UnitedDeployment Adaptive strategy

Signed-off-by: AiRanthem <zhongtianyun.zty@alibaba-inc.com>

* Feature: Temporary reschedule for UnitedDeployment Adaptive strategy

Signed-off-by: AiRanthem <zhongtianyun.zty@alibaba-inc.com>

* Feature: Temporary reschedule for UnitedDeployment Adaptive strategy

Signed-off-by: AiRanthem <zhongtianyun.zty@alibaba-inc.com>

* Feature: Temporary reschedule for UnitedDeployment Adaptive strategy

Signed-off-by: AiRanthem <zhongtianyun.zty@alibaba-inc.com>

* Feature: Temporary reschedule for UnitedDeployment Adaptive strategy

Signed-off-by: AiRanthem <zhongtianyun.zty@alibaba-inc.com>

* Feature: Temporary reschedule for UnitedDeployment Adaptive strategy

Signed-off-by: AiRanthem <zhongtianyun.zty@alibaba-inc.com>

---------

Signed-off-by: AiRanthem <zhongtianyun.zty@alibaba-inc.com>
2025-07-21 19:37:53 +08:00
Ai Ranthem 65478006c9
Fix: non-percentage string value for maxSurge / maxUnavailable of CloneSet UpdateStrategy will be validated properly (#2111)
Signed-off-by: AiRanthem <zhongtianyun.zty@alibaba-inc.com>
2025-07-16 09:34:59 +08:00
dependabot[bot] abdda530d8
chore(deps): bump aquasecurity/trivy-action (#2110)
Bumps [aquasecurity/trivy-action](https://github.com/aquasecurity/trivy-action) from d2a392a13760cb64cb6bbd31d4bed2a7d9a5298d to 77137e9dc3ab1b329b7c8a38c2eb7475850a14e8.
- [Release notes](https://github.com/aquasecurity/trivy-action/releases)
- [Commits](d2a392a137...77137e9dc3)

---
updated-dependencies:
- dependency-name: aquasecurity/trivy-action
  dependency-version: 77137e9dc3ab1b329b7c8a38c2eb7475850a14e8
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-15 17:49:47 +08:00
Gautam Manchandani a7cb4bdf20
added ut for configuration.go (#2103)
Signed-off-by: GautamBytes <manchandanigautam@gmail.com>
2025-07-14 10:17:12 +08:00
Gautam Manchandani fb775bd071
Add unit tests for daemon util functions (#2098)
* added unit test for util.go

---------

Signed-off-by: GautamBytes <manchandanigautam@gmail.com>
2025-07-14 10:10:52 +08:00
Derek Lopes 925982d429
Fix statefulset actions stop when pod is stuck in terminating (#2109)
Signed-off-by: derlopes-amzn <derlopes@amazon.com>
2025-07-14 10:00:58 +08:00
Gautam Manchandani d4d417d261
added healthz.go unit test (#2099)
Signed-off-by: GautamBytes <manchandanigautam@gmail.com>
2025-07-14 09:58:33 +08:00
JieWu 8e300c52fa
fix(cloneset): sort is unstable when using PrioritySorter in cloneset update, close #2106 (#2107)
Signed-off-by: Spground <pingshan.wj@alibaba-inc.com>
Co-authored-by: Spground <pingshan.wj@alibaba-inc.com>
2025-07-11 10:03:42 +08:00
Zhen Zhang f69813ce9c
upgrade k8s and go dependency to solve security alert (#2091)
Signed-off-by: 守辰 <shouchen.zz@alibaba-inc.com>
2025-06-30 16:48:32 +08:00
chengjoey f07f7088bf
upgrade k8s deps to 1.32 (#2067)
* upgrade k8s deps to 1.32

Signed-off-by: joey <zchengjoey@gmail.com>

* update pod resources by patch in 1.32+

Signed-off-by: joey <zchengjoey@gmail.com>

---------

Signed-off-by: joey <zchengjoey@gmail.com>
2025-06-30 13:19:33 +08:00
HrimfaxiYKW 4778e7cfea
feature: add RESIZE action for pub protection. (#2061)
* feature: add RESIZE action for pub protection

---------

Signed-off-by: Colvin-Y <Colvin-Y@github.com>
Co-authored-by: Colvin-Y <Colvin-Y@github.com>
2025-06-27 11:00:58 +08:00
MichaelRren fc611f0505
fix(cloneset): transition pod lifecycle from PreparingNormal to Normal after scheduling when PreNormal hook is not specified (#2087)
* the pod lifecycle can be transformed from PreparingNormal to Normal only if ContainerReady is true(#1485)

Signed-off-by: michaelrren <m.renhaoshi@gmail.com>
Co-authored-by: chenpeicheng9 <chenpeicheng9@gmail.com>
2025-06-25 10:38:44 +08:00
dependabot[bot] 345c20a095
chore(deps): bump ruby/setup-ruby from 1.237.0 to 1.245.0 (#2089)
Bumps [ruby/setup-ruby](https://github.com/ruby/setup-ruby) from 1.237.0 to 1.245.0.
- [Release notes](https://github.com/ruby/setup-ruby/releases)
- [Changelog](https://github.com/ruby/setup-ruby/blob/master/release.rb)
- [Commits](eaecf785f6...a4effe49ee)

---
updated-dependencies:
- dependency-name: ruby/setup-ruby
  dependency-version: 1.245.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-17 13:36:20 +08:00
dependabot[bot] e132c8c0f5
chore(deps): bump github/codeql-action from 3.28.17 to 3.29.0 (#2088)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.28.17 to 3.29.0.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](60168efe1c...ce28f5bb42)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 3.29.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-17 11:30:58 +08:00
Abner 51bb0dc2b0
fix master test error (#2084)
Signed-off-by: Abner-1 <yuanyuxing.yyx@alibaba-inc.com>
2025-06-12 19:37:17 +08:00
Arya Pathak 9ede0b9339
Refactor: Replace deprecated utilpointer.Int32Ptr with ptr.To[int32] (#2068)
* fix: replace utilpointer with ptr

Signed-off-by: Arya Pathak <arya20j4@gmail.com>
2025-06-12 11:06:50 +08:00
Slide d37d9a15a8
fix: Null-dereference READ in sidecarset (#2078) (#2079)
Signed-off-by: yechun <yechun.yc@alibaba-inc.com>
2025-06-10 16:53:01 +08:00
Arya Pathak 509b7b9715
Refactor: Replace deprecated utilpointer.BoolPtr with ptr.To[bool] (#2070)
* fix: replace deprecated utilpointer.BoolPtr with ptr.To in tests

Signed-off-by: Arya Pathak <arya20j4@gmail.com>
2025-06-05 14:29:48 +08:00
MichaelRren fab63bda03
fix(cloneset): process preNormal hook while enable FeatureGate CloneSetEventHandlerOptimization (#2060)
Signed-off-by: michaelrren <m.renhaoshi@gmail.com>
2025-06-05 14:28:34 +08:00
Arya Pathak d058a44291
Refactor: Replace deprecated wait.PollImmediate with wait.PollUntilContextTimeout across codebase (#2076)
* refactor: replace PollImmediate with PollUntilContextTimeout for better context handling in daemonset and pod probe tests

---------

Signed-off-by: Arya Pathak <arya20j4@gmail.com>
2025-06-05 14:20:35 +08:00
dependabot[bot] 686d9b2268
chore(deps): bump ossf/scorecard-action from 2.4.1 to 2.4.2 (#2073)
Bumps [ossf/scorecard-action](https://github.com/ossf/scorecard-action) from 2.4.1 to 2.4.2.
- [Release notes](https://github.com/ossf/scorecard-action/releases)
- [Changelog](https://github.com/ossf/scorecard-action/blob/main/RELEASE.md)
- [Commits](f49aabe0b5...05b42c6244)

---
updated-dependencies:
- dependency-name: ossf/scorecard-action
  dependency-version: 2.4.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-04 12:06:08 +08:00
Abner 648f9337c5
Optimize Inplace-VPA E2E Case: Add Wait Rule or Adjust Expected State (#1999)
* wait for status eventually consistent

Signed-off-by: Abner-1 <yuanyuxing.yyx@alibaba-inc.com>

* refactor inplace e2e

Signed-off-by: Abner-1 <yuanyuxing.yyx@alibaba-inc.com>

---------

Signed-off-by: Abner-1 <yuanyuxing.yyx@alibaba-inc.com>
2025-05-28 09:54:54 +08:00
Arya Pathak 92aead119d
fix: update deployment link to version 1.8.0 in README.md (#2065)
Signed-off-by: Arya Pathak <arya20j4@gmail.com>
2025-05-28 09:51:02 +08:00
Arya Pathak 1320571308
fix: update depreciated event reason formatting using golang.org/x/text package (#2063)
Signed-off-by: Arya Pathak <arya20j4@gmail.com>
2025-05-27 10:00:55 +08:00
Abhiswant Chaudhary 4764af0537
Update (#2055)
Signed-off-by: Abhiswant Chaudhary <abhiswant0324@gmail.com>
2025-05-26 10:27:52 +08:00
dependabot[bot] 715f2099e4
chore(deps): bump codecov/codecov-action from 5.4.0 to 5.4.3 (#2045)
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 5.4.0 to 5.4.3.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](0565863a31...18283e04ce)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-version: 5.4.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-19 20:02:36 +08:00
Slide 9c3a79bf7e
feat: add fuzz test for sidecarset (#1713) (#2010)
Signed-off-by: yechun <yechun.yc@alibaba-inc.com>
2025-05-19 09:39:55 +08:00
Abhiswant Chaudhary 0fbbe891a3
fix: Update Go Version in CONTRIBUTING.md (#2033)
Signed-off-by: Abhiswant Chaudhary <abhiswant0324@gmail.com>
2025-05-15 15:40:52 +08:00
abhi0324 edf0305884
Documentation: Replace placeholder $LINK with actual Embargo Policy link in SECURITY_CONTACTS.md (#2034)
Signed-off-by: Abhiswant Chaudhary <abhiswant0324@gmail.com>
2025-05-15 13:54:34 +08:00
Abner ff8dceca69
init sclist only when enable StatefulSetAutoResizePVCGate (#2020)
Signed-off-by: Abner-1 <yuanyuxing.yyx@alibaba-inc.com>
2025-05-13 10:46:49 +08:00
dependabot[bot] 4025f616aa
Bump github/codeql-action from 3.28.15 to 3.28.17 (#2017)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.28.15 to 3.28.17.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](45775bd823...60168efe1c)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 3.28.17
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-12 17:45:21 +08:00
Arya Pathak 145a67f4b0
fix(docs): Correct grammatical errors in documentation (#2024)
Signed-off-by: Arya Pathak <arya20j4@gmail.com>
2025-05-12 09:42:21 +08:00
Narhari Motivaras ec72c8502f
set upstream after changing to <project> dir (#2022) 2025-05-12 09:31:01 +08:00
Slide dcc9fff249
feat: add fuzz test doc (#1713) (#2021)
Signed-off-by: yechun <yechun.yc@alibaba-inc.com>
2025-05-09 13:28:49 +08:00
Slide 6db558945f
feat: add fuzz test ci (#1713) (#2012)
Signed-off-by: yechun <yechun.yc@alibaba-inc.com>
2025-05-08 14:54:10 +08:00
Kagaya 24e93533d2
feat: podProbeMarker support http prober (#2003)
* feat: podProbeMarker support http prober

Signed-off-by: Kagaya <kagaya85@outlook.com>

* add url.Parse check

Signed-off-by: Kagaya <kagaya85@outlook.com>

---------

Signed-off-by: Kagaya <kagaya85@outlook.com>
2025-05-07 13:45:43 +08:00
berg d65527ea66
sidecarset support shareVolumeDevicePolicy (#2011)
Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>
2025-05-07 13:15:16 +08:00
Zhen Zhang d8bf9c9b53
update golang-lint to v2 and fix related goimports error (#2019)
Signed-off-by: 守辰 <shouchen.zz@alibaba-inc.com>
2025-05-07 10:24:43 +08:00
dependabot[bot] a6fafc5fb4
Bump crate-ci/typos from 1.31.1 to 1.32.0 (#2015)
Bumps [crate-ci/typos](https://github.com/crate-ci/typos) from 1.31.1 to 1.32.0.
- [Release notes](https://github.com/crate-ci/typos/releases)
- [Changelog](https://github.com/crate-ci/typos/blob/master/CHANGELOG.md)
- [Commits](b1a1ef3893...0f0ccba9ed)

---
updated-dependencies:
- dependency-name: crate-ci/typos
  dependency-version: 1.32.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-06 15:29:18 +08:00
dependabot[bot] f97a0f3cb1
Bump ruby/setup-ruby from 1.226.0 to 1.237.0 (#2014)
Bumps [ruby/setup-ruby](https://github.com/ruby/setup-ruby) from 1.226.0 to 1.237.0.
- [Release notes](https://github.com/ruby/setup-ruby/releases)
- [Changelog](https://github.com/ruby/setup-ruby/blob/master/release.rb)
- [Commits](922ebc4c52...eaecf785f6)

---
updated-dependencies:
- dependency-name: ruby/setup-ruby
  dependency-version: 1.237.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-06 15:27:49 +08:00
berg 7d35bcef5c
v1.7.4, v1.8.1 changelog (#2018)
Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>
2025-05-06 14:35:42 +08:00
Slide 8a7085a4b6
feat: add fuzz test for resourcedistribution (#1713) (#1998)
Signed-off-by: yechun <yechun.yc@alibaba-inc.com>
2025-04-27 12:54:18 +08:00
Slide a5968c805e
fix: NestedField function index out of range (#2008) (#2009)
Signed-off-by: yechun <yechun.yc@alibaba-inc.com>
2025-04-27 10:20:51 +08:00
berg c5bc8a0809
Performance optimized PodProbeMarker to reduce many invalid patch operations (#2007)
Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>
2025-04-24 20:45:43 +08:00
dependabot[bot] 1e70d1d459
Bump crate-ci/typos from 1.30.0 to 1.31.1 (#1988)
Bumps [crate-ci/typos](https://github.com/crate-ci/typos) from 1.30.0 to 1.31.1.
- [Release notes](https://github.com/crate-ci/typos/releases)
- [Changelog](https://github.com/crate-ci/typos/blob/master/CHANGELOG.md)
- [Commits](8951ef9cb5...b1a1ef3893)

---
updated-dependencies:
- dependency-name: crate-ci/typos
  dependency-version: 1.31.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-23 12:08:03 +08:00
Abner 0890e5f9e4
fix panic in chan pool (#2004)
Signed-off-by: Abner-1 <yuanyuxing.yyx@alibaba-inc.com>
2025-04-23 12:06:44 +08:00
Ai Ranthem 683ce2a993
Fix: Running parallel WorkloadSpread E2E test would fail due to the fake-zone label being deleted after another test completed. (#1996)
Signed-off-by: AiRanthem <zhongtianyun.zty@alibaba-inc.com>
2025-04-17 17:15:29 +08:00
Abner 318165b7ea
add concurrency control when pull image in daemon (#1918)
* add concurrency control when pull image in daemon
add ut for daemon and test limited worker pool
try to ignore pkg client code coverage

Signed-off-by: Abner-1 <yuanyuxing.yyx@alibaba-inc.com>

* use chan worker pool as default daemon worker pool

Signed-off-by: Abner-1 <yuanyuxing.yyx@alibaba-inc.com>

---------

Signed-off-by: Abner-1 <yuanyuxing.yyx@alibaba-inc.com>
2025-04-16 21:57:24 +08:00
Abner a79a4fb21e
use ubuntu 24.04 to run github check (#1997)
Signed-off-by: Abner-1 <yuanyuxing.yyx@alibaba-inc.com>
2025-04-16 13:32:23 +08:00
dependabot[bot] e149b48327
Bump github/codeql-action from 3.28.12 to 3.28.15 (#1993)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.28.12 to 3.28.15.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](5f8171a638...45775bd823)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 3.28.15
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-14 20:11:06 +08:00
Yak2p e1ab6b4a4d
fix: set the ResourceIsPod of DefaultPodValidationOptions to false (#1986) (#1986)
Signed-off-by: Yesphet <mildtheorem@gmail.com>
2025-04-14 10:56:27 +08:00
Slide 2bf44b19bf
feat: add fuzz test for workloadspread and uniteddeployment (#1713) (#1990)
Signed-off-by: yechun <yechun.yc@alibaba-inc.com>
2025-04-14 10:54:28 +08:00
berg 964335a753
JobSidecarTerminator support ignore exit code capability via env (#1949)
Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>
2025-04-10 14:22:26 +08:00
berg 64bcfa6366
sort sidecarset sidecar containers (#1983)
Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>
2025-04-08 14:02:16 +08:00
Slide 483dc2fdd5
Fix: StatefulSet get failed in validateWorkloadSpreadSpec (#1964) (#1965)
Signed-off-by: yechun <yechun.yc@alibaba-inc.com>
2025-03-28 20:46:36 +08:00
dependabot[bot] 076d160b1e
Bump actions/setup-go from 5.2.0 to 5.4.0 (#1968)
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 5.2.0 to 5.4.0.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](3041bf56c9...0aaccfd150)

---
updated-dependencies:
- dependency-name: actions/setup-go
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-28 20:40:32 +08:00
Ai Ranthem 18ef834d14
Fix: add some logs for WorkloadSpread managing existing pods (#1976)
Signed-off-by: AiRanthem <zhongtianyun.zty@alibaba-inc.com>
2025-03-28 18:56:06 +08:00
Slide b7bdfffae0
Fix: NestedField function index out of range (#1966) (#1967)
Signed-off-by: yechun <yechun.yc@alibaba-inc.com>
2025-03-28 13:38:56 +08:00
berg f4bcfb2d95
fix podprobemarker e2e failed (#1974)
* fix podprobemarker e2e failed

---------

Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>
2025-03-26 14:04:31 +08:00
dependabot[bot] c286742d69 Bump github/codeql-action from 3.28.8 to 3.28.12
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.28.8 to 3.28.12.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](dd746615b3...5f8171a638)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-26 13:34:51 +08:00
dependabot[bot] 7c53444d79 Bump ossf/scorecard-action from 2.4.0 to 2.4.1
Bumps [ossf/scorecard-action](https://github.com/ossf/scorecard-action) from 2.4.0 to 2.4.1.
- [Release notes](https://github.com/ossf/scorecard-action/releases)
- [Changelog](https://github.com/ossf/scorecard-action/blob/main/RELEASE.md)
- [Commits](62b2cac7ed...f49aabe0b5)

---
updated-dependencies:
- dependency-name: ossf/scorecard-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-18 13:22:48 +08:00
dependabot[bot] 14d9ebdbfc Bump ruby/setup-ruby from 1.221.0 to 1.226.0
Bumps [ruby/setup-ruby](https://github.com/ruby/setup-ruby) from 1.221.0 to 1.226.0.
- [Release notes](https://github.com/ruby/setup-ruby/releases)
- [Changelog](https://github.com/ruby/setup-ruby/blob/master/release.rb)
- [Commits](32110d4e31...922ebc4c52)

---
updated-dependencies:
- dependency-name: ruby/setup-ruby
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-18 09:28:44 +08:00
Peng Peng 7bca8af823
Add Windows support to kruise-daemon (#1909)
* Add Windows support for kruise-daemon

Signed-off-by: ppbits <ppbits3@gmail.com>

* Fix image service error

Signed-off-by: ppbits <ppbits3@gmail.com>

* minor fix

Signed-off-by: ppbits <ppbits3@gmail.com>

* rename daemon windows yaml

Signed-off-by: ppbits <ppbits3@gmail.com>

* remove ws2022 yaml

Signed-off-by: ppbits <ppbits3@gmail.com>

* Add unit tests

Signed-off-by: Peng Peng <ppbits3@gmail.com>

* fix unit tests

Signed-off-by: Peng Peng <ppbits3@gmail.com>

* fix unit tests

Signed-off-by: Peng Peng <ppbits3@gmail.com>

* fix image service issue

Signed-off-by: Peng Peng <ppbits3@gmail.com>

* fix golangci-lint issues

Signed-off-by: Peng Peng <ppbits3@gmail.com>

* minor fix

Signed-off-by: Peng Peng <ppbits3@gmail.com>

* Add makefile entries for Windows daemon

Signed-off-by: Peng Peng <ppbits3@gmail.com>

---------

Signed-off-by: ppbits <ppbits3@gmail.com>
Signed-off-by: Peng Peng <ppbits3@gmail.com>
2025-03-07 13:19:25 +08:00
dependabot[bot] 6e20fa884a Bump ruby/setup-ruby from 1.213.0 to 1.221.0
Bumps [ruby/setup-ruby](https://github.com/ruby/setup-ruby) from 1.213.0 to 1.221.0.
- [Release notes](https://github.com/ruby/setup-ruby/releases)
- [Changelog](https://github.com/ruby/setup-ruby/blob/master/release.rb)
- [Commits](28c4deda89...32110d4e31)

---
updated-dependencies:
- dependency-name: ruby/setup-ruby
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-04 14:18:50 +08:00
dependabot[bot] 39dde1a2d4 Bump crate-ci/typos from 1.29.5 to 1.30.0
Bumps [crate-ci/typos](https://github.com/crate-ci/typos) from 1.29.5 to 1.30.0.
- [Release notes](https://github.com/crate-ci/typos/releases)
- [Changelog](https://github.com/crate-ci/typos/blob/master/CHANGELOG.md)
- [Commits](11ca4583f2...8951ef9cb5)

---
updated-dependencies:
- dependency-name: crate-ci/typos
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-04 13:12:49 +08:00
dependabot[bot] 79943f5b6a Bump codecov/codecov-action from 5.3.1 to 5.4.0
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 5.3.1 to 5.4.0.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](13ce06bfc6...0565863a31)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-04 13:12:00 +08:00
liheng.zms 5e46d3a6a3 args webhook initialize timeout, default is 60s
Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>
2025-03-04 13:10:58 +08:00
Abner-1 29258d3f04 fix controller-gen gen crd bugs
Signed-off-by: Abner-1 <yuanyuxing.yyx@alibaba-inc.com>
2025-02-25 16:02:47 +08:00
青炽 6d2f3f5fcc chore: quick deploy button for openkruise
Signed-off-by: 青炽 <hanyuntao.hyt@alibaba-inc.com>
2025-02-18 17:36:32 +08:00
dependabot[bot] bf4d1d8860 Bump helm/kind-action from 1.10.0 to 1.12.0
Bumps [helm/kind-action](https://github.com/helm/kind-action) from 1.10.0 to 1.12.0.
- [Release notes](https://github.com/helm/kind-action/releases)
- [Commits](https://github.com/helm/kind-action/compare/v1.10.0...a1b0e391336a6ee6713a0583f8c6240d70863de3)

---
updated-dependencies:
- dependency-name: helm/kind-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-18 09:53:17 +08:00
dependabot[bot] 222fe89f6d Bump golangci/golangci-lint-action from 6.1.1 to 6.5.0
Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 6.1.1 to 6.5.0.
- [Release notes](https://github.com/golangci/golangci-lint-action/releases)
- [Commits](971e284b60...2226d7cb06)

---
updated-dependencies:
- dependency-name: golangci/golangci-lint-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-18 09:52:12 +08:00
Abner-1 9f249f954d add changelog for 1.8
Signed-off-by: Abner-1 <yuanyuxing.yyx@alibaba-inc.com>
2025-02-17 20:42:53 +08:00
Zhen Zhang 22daf9a981
Bump k8s.io/kubernetes from 1.30.9 to 1.30.10 (#1924)
Bumps [k8s.io/kubernetes](https://github.com/kubernetes/kubernetes) from 1.30.9 to 1.30.10.
- [Release notes](https://github.com/kubernetes/kubernetes/releases)
- [Commits](https://github.com/kubernetes/kubernetes/compare/v1.30.9...v1.30.10)

---
updated-dependencies:
- dependency-name: k8s.io/kubernetes
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-17 14:12:29 +08:00
435 changed files with 18401 additions and 11244 deletions

View File

@ -1,3 +1,6 @@
ignore: ignore:
- "pkg/client/.*" - "pkg/client/.*"
- "test/fuzz/.*"
- "test/e2e/.*"

View File

@ -5,16 +5,16 @@ on:
branches: branches:
- master - master
- release-* - release-*
pull_request: {} pull_request: { }
workflow_dispatch: {} workflow_dispatch: { }
# Declare default permissions as read only. # Declare default permissions as read only.
permissions: read-all permissions: read-all
env: env:
# Common versions # Common versions
GO_VERSION: '1.22' GO_VERSION: '1.23'
GOLANGCI_VERSION: 'v1.55.2' GOLANGCI_VERSION: 'v2.1'
DOCKER_BUILDX_VERSION: 'v0.4.2' DOCKER_BUILDX_VERSION: 'v0.4.2'
# Common users. We can't run a step 'if secrets.AWS_USR != ""' but we can run # Common users. We can't run a step 'if secrets.AWS_USR != ""' but we can run
@ -26,17 +26,17 @@ env:
jobs: jobs:
typos-check: typos-check:
name: Spell Check with Typos name: Spell Check with Typos
runs-on: ubuntu-20.04 runs-on: ubuntu-24.04
steps: steps:
- name: Checkout Actions Repository - name: Checkout Actions Repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Check spelling with custom config file - name: Check spelling with custom config file
uses: crate-ci/typos@11ca4583f2f3f74c7e7785c0ecb20fe2c99a4308 # v1.29.5 uses: crate-ci/typos@a67079b4ae32e18c3f53d75368c52ce53b5fb56b # v1.35.4
with: with:
config: ./typos.toml config: ./typos.toml
golangci-lint: golangci-lint:
runs-on: ubuntu-20.04 runs-on: ubuntu-24.04
permissions: permissions:
security-events: write security-events: write
steps: steps:
@ -45,11 +45,11 @@ jobs:
with: with:
submodules: true submodules: true
- name: Setup Go - name: Setup Go
uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0 uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
with: with:
go-version: ${{ env.GO_VERSION }} go-version: ${{ env.GO_VERSION }}
- name: Cache Go Dependencies - name: Cache Go Dependencies
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
with: with:
path: ~/go/pkg/mod path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
@ -58,14 +58,14 @@ jobs:
run: | run: |
make generate make generate
- name: Lint golang code - name: Lint golang code
uses: golangci/golangci-lint-action@971e284b6050e8a5849b72094c50ab08da042db8 # v6.1.1 uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 # v8.0.0
with: with:
version: ${{ env.GOLANGCI_VERSION }} version: ${{ env.GOLANGCI_VERSION }}
args: --verbose args: --verbose
skip-pkg-cache: true skip-pkg-cache: true
mod: readonly mod: readonly
- name: Run Trivy vulnerability scanner in repo mode - name: Run Trivy vulnerability scanner in repo mode
uses: aquasecurity/trivy-action@d2a392a13760cb64cb6bbd31d4bed2a7d9a5298d # master uses: aquasecurity/trivy-action@77137e9dc3ab1b329b7c8a38c2eb7475850a14e8 # master
with: with:
scan-type: 'fs' scan-type: 'fs'
ignore-unfixed: true ignore-unfixed: true
@ -73,12 +73,12 @@ jobs:
output: 'trivy-results.sarif' output: 'trivy-results.sarif'
severity: 'CRITICAL' severity: 'CRITICAL'
- name: Upload Trivy scan results to GitHub Security tab - name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@dd746615b3b9d728a6a37ca2045b68ca76d4841a # v3.28.8 uses: github/codeql-action/upload-sarif@df559355d593797519d70b90fc8edd5db049e7a2 # v3.29.9
with: with:
sarif_file: 'trivy-results.sarif' sarif_file: 'trivy-results.sarif'
# markdownlint-misspell-shellcheck: # markdownlint-misspell-shellcheck:
# runs-on: ubuntu-20.04 # runs-on: ubuntu-24.04
# # this image is build from Dockerfile # # this image is build from Dockerfile
# # https://github.com/pouchcontainer/pouchlinter/blob/master/Dockerfile # # https://github.com/pouchcontainer/pouchlinter/blob/master/Dockerfile
# container: pouchcontainer/pouchlinter:v0.1.2 # container: pouchcontainer/pouchlinter:v0.1.2
@ -91,7 +91,6 @@ jobs:
# run: find ./ -name "*.sh" | grep -v vendor | xargs shellcheck # run: find ./ -name "*.sh" | grep -v vendor | xargs shellcheck
# - name: Lint markdown files # - name: Lint markdown files
# run: find ./ -name "*.md" | grep -v vendor | grep -v commandline | grep -v .github | grep -v swagger | grep -v api | xargs mdl -r ~MD010,~MD013,~MD014,~MD022,~MD024,~MD029,~MD031,~MD032,~MD033,~MD036 # run: find ./ -name "*.md" | grep -v vendor | grep -v commandline | grep -v .github | grep -v swagger | grep -v api | xargs mdl -r ~MD010,~MD013,~MD014,~MD022,~MD024,~MD029,~MD031,~MD032,~MD033,~MD036
# - name: Check markdown links # - name: Check markdown links
# run: | # run: |
# set +e # set +e
@ -106,7 +105,7 @@ jobs:
# bash -c "exit $code"; # bash -c "exit $code";
unit-tests: unit-tests:
runs-on: ubuntu-20.04 runs-on: ubuntu-24.04
steps: steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with: with:
@ -114,11 +113,11 @@ jobs:
- name: Fetch History - name: Fetch History
run: git fetch --prune --unshallow run: git fetch --prune --unshallow
- name: Setup Go - name: Setup Go
uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0 uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
with: with:
go-version: ${{ env.GO_VERSION }} go-version: ${{ env.GO_VERSION }}
- name: Cache Go Dependencies - name: Cache Go Dependencies
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
with: with:
path: ~/go/pkg/mod path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
@ -128,10 +127,42 @@ jobs:
make test make test
git status git status
- name: Publish Unit Test Coverage - name: Publish Unit Test Coverage
uses: codecov/codecov-action@13ce06bfc6bbe3ecf90edbbf1bc32fe5978ca1d3 # v5.3.1 uses: codecov/codecov-action@fdcc8476540edceab3de004e990f80d881c6cc00 # v5.5.0
env: env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with: with:
token: ${{ secrets.CODECOV_TOKEN }} token: ${{ secrets.CODECOV_TOKEN }}
flags: unittests flags: unittests
file: cover.out file: cover.out
# See: https://google.github.io/oss-fuzz/getting-started/continuous-integration/
Fuzzing:
runs-on: ubuntu-latest
permissions:
security-events: write
steps:
- name: Build Fuzzers
id: build
uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@abe2c06d0e162320403dd10e8268adbb0b8923f8 # master
with:
oss-fuzz-project-name: 'openkruise'
language: go
- name: Run Fuzzers
uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@abe2c06d0e162320403dd10e8268adbb0b8923f8 # master
with:
oss-fuzz-project-name: 'openkruise'
language: go
fuzz-seconds: 1200
output-sarif: true
- name: Upload Crash
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
if: failure() && steps.build.outcome == 'success'
with:
name: artifacts
path: ./out/artifacts
- name: Upload Sarif
if: always() && steps.build.outcome == 'success'
uses: github/codeql-action/upload-sarif@df559355d593797519d70b90fc8edd5db049e7a2 # v3.29.9
with:
# Path to SARIF file relative to the root of the repository
sarif_file: cifuzz-sarif/results.sarif
checkout_path: cifuzz-sarif

View File

@ -52,7 +52,7 @@ jobs:
# Initializes the CodeQL tools for scanning. # Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL - name: Initialize CodeQL
uses: github/codeql-action/init@dd746615b3b9d728a6a37ca2045b68ca76d4841a # v3.28.8 uses: github/codeql-action/init@df559355d593797519d70b90fc8edd5db049e7a2 # v3.29.9
with: with:
languages: ${{ matrix.language }} languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file. # If you wish to specify custom queries, you can do so here or in a config file.
@ -66,7 +66,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift). # Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
# If this step fails, then you should remove it and run the build manually (see below) # If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild - name: Autobuild
uses: github/codeql-action/autobuild@dd746615b3b9d728a6a37ca2045b68ca76d4841a # v3.28.8 uses: github/codeql-action/autobuild@df559355d593797519d70b90fc8edd5db049e7a2 # v3.29.9
# Command-line programs to run using the OS shell. # Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
@ -79,6 +79,6 @@ jobs:
# ./location_of_script_within_repo/buildscript.sh # ./location_of_script_within_repo/buildscript.sh
- name: Perform CodeQL Analysis - name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@dd746615b3b9d728a6a37ca2045b68ca76d4841a # v3.28.8 uses: github/codeql-action/analyze@df559355d593797519d70b90fc8edd5db049e7a2 # v3.29.9
with: with:
category: "/language:${{matrix.language}}" category: "/language:${{matrix.language}}"

View File

@ -1,627 +0,0 @@
name: E2E-1.18
on:
push:
branches:
- master
- release-*
pull_request: {}
workflow_dispatch: {}
# Declare default permissions as read only.
permissions: read-all
env:
# Common versions
GO_VERSION: '1.22'
KIND_VERSION: 'v0.14.0'
KIND_IMAGE: 'kindest/node:v1.18.20'
KIND_CLUSTER_NAME: 'ci-testing'
jobs:
astatefulset-storage:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
submodules: true
- name: Setup Go
uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0
with:
go-version: ${{ env.GO_VERSION }}
- name: Setup Kind Cluster
uses: helm/kind-action@a1b0e391336a6ee6713a0583f8c6240d70863de3 # v1.12.0
with:
node_image: ${{ env.KIND_IMAGE }}
cluster_name: ${{ env.KIND_CLUSTER_NAME }}
config: ./test/kind-conf.yaml
version: ${{ env.KIND_VERSION }}
- name: Install-CSI
run: |
cd tools/hack/csi-driver-host-path; ./install-snapshot-1.18.sh
- name: Build image
run: |
export IMAGE="openkruise/kruise-manager:e2e-${GITHUB_RUN_ID}"
docker build --pull --no-cache . -t $IMAGE
kind load docker-image --name=${KIND_CLUSTER_NAME} $IMAGE || { echo >&2 "kind not installed or error loading image: $IMAGE"; exit 1; }
- name: Install Kruise
run: |
set -ex
kubectl cluster-info
IMG=openkruise/kruise-manager:e2e-${GITHUB_RUN_ID} ./scripts/deploy_kind.sh
NODES=$(kubectl get node | wc -l)
for ((i=1;i<10;i++));
do
set +e
PODS=$(kubectl get pod -n kruise-system | grep '1/1' | wc -l)
set -e
if [ "$PODS" -eq "$NODES" ]; then
break
fi
sleep 3
done
set +e
PODS=$(kubectl get pod -n kruise-system | grep '1/1' | wc -l)
kubectl get node -o yaml
kubectl get all -n kruise-system -o yaml
kubectl get pod -n kruise-system --no-headers | grep daemon | awk '{print $1}' | xargs kubectl logs -n kruise-system
kubectl get pod -n kruise-system --no-headers | grep daemon | awk '{print $1}' | xargs kubectl logs -n kruise-system --previous=true
set -e
if [ "$PODS" -eq "$NODES" ]; then
echo "Wait for kruise-manager and kruise-daemon ready successfully"
else
echo "Timeout to wait for kruise-manager and kruise-daemon ready"
exit 1
fi
- name: Run E2E Tests
run: |
export KUBECONFIG=/home/runner/.kube/config
make ginkgo
set +e
./bin/ginkgo -timeout 60m -p -v --focus='\[apps\] AppStatefulSetStorage' test/e2e
retVal=$?
restartCount=$(kubectl get pod -n kruise-system -l control-plane=controller-manager --no-headers | awk '{print $4}')
if [ "${restartCount}" -eq "0" ];then
echo "Kruise-manager has not restarted"
else
kubectl get pod -n kruise-system -l control-plane=controller-manager --no-headers
echo "Kruise-manager has restarted, abort!!!"
kubectl get pod -n kruise-system --no-headers -l control-plane=controller-manager | awk '{print $1}' | xargs kubectl logs -p -n kruise-system
exit 1
fi
if [ "$retVal" -ne 0 ];then
echo "test fail, dump kruise-manager logs"
while read pod; do
kubectl logs -n kruise-system $pod
done < <(kubectl get pods -n kruise-system -l control-plane=controller-manager --no-headers | awk '{print $1}')
echo "test fail, dump kruise-daemon logs"
while read pod; do
kubectl logs -n kruise-system $pod
done < <(kubectl get pods -n kruise-system -l control-plane=daemon --no-headers | awk '{print $1}')
fi
exit $retVal
astatefulset:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
submodules: true
- name: Setup Go
uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0
with:
go-version: ${{ env.GO_VERSION }}
- name: Setup Kind Cluster
uses: helm/kind-action@a1b0e391336a6ee6713a0583f8c6240d70863de3 # v1.12.0
with:
node_image: ${{ env.KIND_IMAGE }}
cluster_name: ${{ env.KIND_CLUSTER_NAME }}
config: ./test/kind-conf.yaml
version: ${{ env.KIND_VERSION }}
- name: Build image
run: |
export IMAGE="openkruise/kruise-manager:e2e-${GITHUB_RUN_ID}"
docker build --pull --no-cache . -t $IMAGE
kind load docker-image --name=${KIND_CLUSTER_NAME} $IMAGE || { echo >&2 "kind not installed or error loading image: $IMAGE"; exit 1; }
- name: Install Kruise
run: |
set -ex
kubectl cluster-info
IMG=openkruise/kruise-manager:e2e-${GITHUB_RUN_ID} ./scripts/deploy_kind.sh
NODES=$(kubectl get node | wc -l)
for ((i=1;i<10;i++));
do
set +e
PODS=$(kubectl get pod -n kruise-system | grep '1/1' | wc -l)
set -e
if [ "$PODS" -eq "$NODES" ]; then
break
fi
sleep 3
done
set +e
PODS=$(kubectl get pod -n kruise-system | grep '1/1' | wc -l)
kubectl get node -o yaml
kubectl get all -n kruise-system -o yaml
kubectl get pod -n kruise-system --no-headers | grep daemon | awk '{print $1}' | xargs kubectl logs -n kruise-system
kubectl get pod -n kruise-system --no-headers | grep daemon | awk '{print $1}' | xargs kubectl logs -n kruise-system --previous=true
set -e
if [ "$PODS" -eq "$NODES" ]; then
echo "Wait for kruise-manager and kruise-daemon ready successfully"
else
echo "Timeout to wait for kruise-manager and kruise-daemon ready"
exit 1
fi
- name: Run E2E Tests
run: |
export KUBECONFIG=/home/runner/.kube/config
make ginkgo
set +e
./bin/ginkgo -timeout 60m -v --focus='\[apps\] StatefulSet' test/e2e
retVal=$?
restartCount=$(kubectl get pod -n kruise-system -l control-plane=controller-manager --no-headers | awk '{print $4}')
if [ "${restartCount}" -eq "0" ];then
echo "$out"
echo "Kruise-manager has not restarted"
else
echo "$out"
echo "Kruise-manager has restarted, abort!!!"
kubectl get pod -n kruise-system --no-headers -l control-plane=controller-manager | awk '{print $1}' | xargs kubectl logs -p -n kruise-system
exit 1
fi
kubectl get pods -n kruise-system -l control-plane=daemon -o=jsonpath="{range .items[*]}{.metadata.namespace}{\"\t\"}{.metadata.name}{\"\n\"}{end}" | while read ns name;
do
restartCount=$(kubectl get pod -n ${ns} ${name} --no-headers | awk '{print $4}')
if [ "${restartCount}" -eq "0" ];then
echo "Kruise-daemon has not restarted"
else
kubectl get pods -n ${ns} -l control-plane=daemon --no-headers
echo "Kruise-daemon has restarted, abort!!!"
kubectl logs -p -n ${ns} ${name}
exit 1
fi
done
if [ "$retVal" -ne 0 ];then
echo "test fail, dump kruise-manager logs"
while read pod; do
kubectl logs -n kruise-system $pod
done < <(kubectl get pods -n kruise-system -l control-plane=controller-manager --no-headers | awk '{print $1}')
echo "test fail, dump kruise-daemon logs"
while read pod; do
kubectl logs -n kruise-system $pod
done < <(kubectl get pods -n kruise-system -l control-plane=daemon --no-headers | awk '{print $1}')
fi
exit $retVal
pullimages-containerrecreate:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
submodules: true
- name: Setup Go
uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0
with:
go-version: ${{ env.GO_VERSION }}
- name: Setup Kind Cluster
uses: helm/kind-action@a1b0e391336a6ee6713a0583f8c6240d70863de3 # v1.12.0
with:
node_image: ${{ env.KIND_IMAGE }}
cluster_name: ${{ env.KIND_CLUSTER_NAME }}
config: ./test/kind-conf.yaml
version: ${{ env.KIND_VERSION }}
- name: Build image
run: |
export IMAGE="openkruise/kruise-manager:e2e-${GITHUB_RUN_ID}"
docker build --pull --no-cache . -t $IMAGE
kind load docker-image --name=${KIND_CLUSTER_NAME} $IMAGE || { echo >&2 "kind not installed or error loading image: $IMAGE"; exit 1; }
- name: Install Kruise
run: |
set -ex
kubectl cluster-info
IMG=openkruise/kruise-manager:e2e-${GITHUB_RUN_ID} ./scripts/deploy_kind.sh
NODES=$(kubectl get node | wc -l)
for ((i=1;i<10;i++));
do
set +e
PODS=$(kubectl get pod -n kruise-system | grep '1/1' | wc -l)
set -e
if [ "$PODS" -eq "$NODES" ]; then
break
fi
sleep 3
done
set +e
PODS=$(kubectl get pod -n kruise-system | grep '1/1' | wc -l)
kubectl get node -o yaml
kubectl get all -n kruise-system -o yaml
kubectl get pod -n kruise-system --no-headers | grep daemon | awk '{print $1}' | xargs kubectl logs -n kruise-system
kubectl get pod -n kruise-system --no-headers | grep daemon | awk '{print $1}' | xargs kubectl logs -n kruise-system --previous=true
set -e
if [ "$PODS" -eq "$NODES" ]; then
echo "Wait for kruise-manager and kruise-daemon ready successfully"
else
echo "Timeout to wait for kruise-manager and kruise-daemon ready"
exit 1
fi
- name: Run E2E Tests
run: |
export KUBECONFIG=/home/runner/.kube/config
make ginkgo
set +e
./bin/ginkgo -timeout 60m -v --focus='\[apps\] (PullImage|ContainerRecreateRequest|PullImages)' test/e2e
retVal=$?
restartCount=$(kubectl get pod -n kruise-system -l control-plane=controller-manager --no-headers | awk '{print $4}')
if [ "${restartCount}" -eq "0" ];then
echo "Kruise-manager has not restarted"
else
kubectl get pod -n kruise-system -l control-plane=controller-manager --no-headers
echo "Kruise-manager has restarted, abort!!!"
kubectl get pod -n kruise-system --no-headers -l control-plane=controller-manager | awk '{print $1}' | xargs kubectl logs -p -n kruise-system
exit 1
fi
kubectl get pods -n kruise-system -l control-plane=daemon -o=jsonpath="{range .items[*]}{.metadata.namespace}{\"\t\"}{.metadata.name}{\"\n\"}{end}" | while read ns name;
do
restartCount=$(kubectl get pod -n ${ns} ${name} --no-headers | awk '{print $4}')
if [ "${restartCount}" -eq "0" ];then
echo "Kruise-daemon has not restarted"
else
kubectl get pods -n ${ns} -l control-plane=daemon --no-headers
echo "Kruise-daemon has restarted, abort!!!"
kubectl logs -p -n ${ns} ${name}
exit 1
fi
done
if [ "$retVal" -ne 0 ];then
echo "test fail, dump kruise-manager logs"
while read pod; do
kubectl logs -n kruise-system $pod
done < <(kubectl get pods -n kruise-system -l control-plane=controller-manager --no-headers | awk '{print $1}')
echo "test fail, dump kruise-daemon logs"
while read pod; do
kubectl logs -n kruise-system $pod
done < <(kubectl get pods -n kruise-system -l control-plane=daemon --no-headers | awk '{print $1}')
fi
exit $retVal
advanced-daemonset:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
submodules: true
- name: Setup Go
uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0
with:
go-version: ${{ env.GO_VERSION }}
- name: Setup Kind Cluster
uses: helm/kind-action@a1b0e391336a6ee6713a0583f8c6240d70863de3 # v1.12.0
with:
node_image: ${{ env.KIND_IMAGE }}
cluster_name: ${{ env.KIND_CLUSTER_NAME }}
config: ./test/kind-conf.yaml
version: ${{ env.KIND_VERSION }}
- name: Build image
run: |
export IMAGE="openkruise/kruise-manager:e2e-${GITHUB_RUN_ID}"
docker build --pull --no-cache . -t $IMAGE
kind load docker-image --name=${KIND_CLUSTER_NAME} $IMAGE || { echo >&2 "kind not installed or error loading image: $IMAGE"; exit 1; }
- name: Install Kruise
run: |
set -ex
kubectl cluster-info
IMG=openkruise/kruise-manager:e2e-${GITHUB_RUN_ID} ./scripts/deploy_kind.sh
NODES=$(kubectl get node | wc -l)
for ((i=1;i<10;i++));
do
set +e
PODS=$(kubectl get pod -n kruise-system | grep '1/1' | wc -l)
set -e
if [ "$PODS" -eq "$NODES" ]; then
break
fi
sleep 3
done
set +e
PODS=$(kubectl get pod -n kruise-system | grep '1/1' | wc -l)
kubectl get node -o yaml
kubectl get all -n kruise-system -o yaml
kubectl get pod -n kruise-system --no-headers | grep daemon | awk '{print $1}' | xargs kubectl logs -n kruise-system
kubectl get pod -n kruise-system --no-headers | grep daemon | awk '{print $1}' | xargs kubectl logs -n kruise-system --previous=true
set -e
if [ "$PODS" -eq "$NODES" ]; then
echo "Wait for kruise-manager and kruise-daemon ready successfully"
else
echo "Timeout to wait for kruise-manager and kruise-daemon ready"
exit 1
fi
- name: Run E2E Tests
run: |
export KUBECONFIG=/home/runner/.kube/config
make ginkgo
set +e
./bin/ginkgo -timeout 60m -v --focus='\[apps\] DaemonSet' test/e2e
retVal=$?
restartCount=$(kubectl get pod -n kruise-system -l control-plane=controller-manager --no-headers | awk '{print $4}')
if [ "${restartCount}" -eq "0" ];then
echo "Kruise-manager has not restarted"
else
kubectl get pod -n kruise-system -l control-plane=controller-manager --no-headers
echo "Kruise-manager has restarted, abort!!!"
kubectl get pod -n kruise-system --no-headers -l control-plane=controller-manager | awk '{print $1}' | xargs kubectl logs -p -n kruise-system
exit 1
fi
kubectl get pods -n kruise-system -l control-plane=daemon -o=jsonpath="{range .items[*]}{.metadata.namespace}{\"\t\"}{.metadata.name}{\"\n\"}{end}" | while read ns name;
do
restartCount=$(kubectl get pod -n ${ns} ${name} --no-headers | awk '{print $4}')
if [ "${restartCount}" -eq "0" ];then
echo "Kruise-daemon has not restarted"
else
kubectl get pods -n ${ns} -l control-plane=daemon --no-headers
echo "Kruise-daemon has restarted, abort!!!"
kubectl logs -p -n ${ns} ${name}
exit 1
fi
done
if [ "$retVal" -ne 0 ];then
echo "test fail, dump kruise-manager logs"
while read pod; do
kubectl logs -n kruise-system $pod
done < <(kubectl get pods -n kruise-system -l control-plane=controller-manager --no-headers | awk '{print $1}')
echo "test fail, dump kruise-daemon logs"
while read pod; do
kubectl logs -n kruise-system $pod
done < <(kubectl get pods -n kruise-system -l control-plane=daemon --no-headers | awk '{print $1}')
fi
exit $retVal
sidecarset:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
submodules: true
- name: Setup Go
uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0
with:
go-version: ${{ env.GO_VERSION }}
- name: Setup Kind Cluster
uses: helm/kind-action@a1b0e391336a6ee6713a0583f8c6240d70863de3 # v1.12.0
with:
node_image: ${{ env.KIND_IMAGE }}
cluster_name: ${{ env.KIND_CLUSTER_NAME }}
config: ./test/kind-conf.yaml
version: ${{ env.KIND_VERSION }}
- name: Build image
run: |
export IMAGE="openkruise/kruise-manager:e2e-${GITHUB_RUN_ID}"
docker build --pull --no-cache . -t $IMAGE
kind load docker-image --name=${KIND_CLUSTER_NAME} $IMAGE || { echo >&2 "kind not installed or error loading image: $IMAGE"; exit 1; }
- name: Install Kruise
run: |
set -ex
kubectl cluster-info
IMG=openkruise/kruise-manager:e2e-${GITHUB_RUN_ID} ./scripts/deploy_kind.sh
NODES=$(kubectl get node | wc -l)
for ((i=1;i<10;i++));
do
set +e
PODS=$(kubectl get pod -n kruise-system | grep '1/1' | wc -l)
set -e
if [ "$PODS" -eq "$NODES" ]; then
break
fi
sleep 3
done
set +e
PODS=$(kubectl get pod -n kruise-system | grep '1/1' | wc -l)
kubectl get node -o yaml
kubectl get all -n kruise-system -o yaml
kubectl get pod -n kruise-system --no-headers | grep daemon | awk '{print $1}' | xargs kubectl logs -n kruise-system
kubectl get pod -n kruise-system --no-headers | grep daemon | awk '{print $1}' | xargs kubectl logs -n kruise-system --previous=true
set -e
if [ "$PODS" -eq "$NODES" ]; then
echo "Wait for kruise-manager and kruise-daemon ready successfully"
else
echo "Timeout to wait for kruise-manager and kruise-daemon ready"
exit 1
fi
- name: Run E2E Tests
run: |
export KUBECONFIG=/home/runner/.kube/config
make ginkgo
set +e
./bin/ginkgo -timeout 60m -v --focus='\[apps\] SidecarSet' test/e2e
retVal=$?
restartCount=$(kubectl get pod -n kruise-system -l control-plane=controller-manager --no-headers | awk '{print $4}')
if [ "${restartCount}" -eq "0" ];then
echo "Kruise-manager has not restarted"
else
kubectl get pod -n kruise-system -l control-plane=controller-manager --no-headers
echo "Kruise-manager has restarted, abort!!!"
kubectl get pod -n kruise-system --no-headers -l control-plane=controller-manager | awk '{print $1}' | xargs kubectl logs -p -n kruise-system
exit 1
fi
kubectl get pods -n kruise-system -l control-plane=daemon -o=jsonpath="{range .items[*]}{.metadata.namespace}{\"\t\"}{.metadata.name}{\"\n\"}{end}" | while read ns name;
do
restartCount=$(kubectl get pod -n ${ns} ${name} --no-headers | awk '{print $4}')
if [ "${restartCount}" -eq "0" ];then
echo "Kruise-daemon has not restarted"
else
kubectl get pods -n ${ns} -l control-plane=daemon --no-headers
echo "Kruise-daemon has restarted, abort!!!"
kubectl logs -p -n ${ns} ${name}
exit 1
fi
done
if [ "$retVal" -ne 0 ];then
echo "test fail, dump kruise-manager logs"
while read pod; do
kubectl logs -n kruise-system $pod
done < <(kubectl get pods -n kruise-system -l control-plane=controller-manager --no-headers | awk '{print $1}')
echo "test fail, dump kruise-daemon logs"
while read pod; do
kubectl logs -n kruise-system $pod
done < <(kubectl get pods -n kruise-system -l control-plane=daemon --no-headers | awk '{print $1}')
fi
exit $retVal
podUnavailableBudget:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
submodules: true
- name: Setup Go
uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0
with:
go-version: ${{ env.GO_VERSION }}
- name: Setup Kind Cluster
uses: helm/kind-action@a1b0e391336a6ee6713a0583f8c6240d70863de3 # v1.12.0
with:
node_image: ${{ env.KIND_IMAGE }}
cluster_name: ${{ env.KIND_CLUSTER_NAME }}
config: ./test/kind-conf.yaml
version: ${{ env.KIND_VERSION }}
- name: Build image
run: |
export IMAGE="openkruise/kruise-manager:e2e-${GITHUB_RUN_ID}"
docker build --pull --no-cache . -t $IMAGE
kind load docker-image --name=${KIND_CLUSTER_NAME} $IMAGE || { echo >&2 "kind not installed or error loading image: $IMAGE"; exit 1; }
- name: Install Kruise
run: |
set -ex
kubectl cluster-info
IMG=openkruise/kruise-manager:e2e-${GITHUB_RUN_ID} ./scripts/deploy_kind.sh
NODES=$(kubectl get node | wc -l)
for ((i=1;i<10;i++));
do
set +e
PODS=$(kubectl get pod -n kruise-system | grep '1/1' | wc -l)
set -e
if [ "$PODS" -eq "$NODES" ]; then
break
fi
sleep 3
done
set +e
PODS=$(kubectl get pod -n kruise-system | grep '1/1' | wc -l)
kubectl get node -o yaml
kubectl get all -n kruise-system -o yaml
kubectl get pod -n kruise-system --no-headers | grep daemon | awk '{print $1}' | xargs kubectl logs -n kruise-system
kubectl get pod -n kruise-system --no-headers | grep daemon | awk '{print $1}' | xargs kubectl logs -n kruise-system --previous=true
set -e
if [ "$PODS" -eq "$NODES" ]; then
echo "Wait for kruise-manager and kruise-daemon ready successfully"
else
echo "Timeout to wait for kruise-manager and kruise-daemon ready"
exit 1
fi
- name: Run E2E Tests
run: |
export KUBECONFIG=/home/runner/.kube/config
make ginkgo
set +e
./bin/ginkgo -timeout 60m -v --focus='\[policy\] PodUnavailableBudget' test/e2e
retVal=$?
if [ "$retVal" -ne 0 ];then
echo "test fail, dump kruise-manager logs"
while read pod; do
kubectl logs -n kruise-system $pod
done < <(kubectl get pods -n kruise-system -l control-plane=controller-manager --no-headers | awk '{print $1}')
fi
exit $retVal
other:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
submodules: true
- name: Setup Go
uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0
with:
go-version: ${{ env.GO_VERSION }}
- name: Setup Kind Cluster
uses: helm/kind-action@a1b0e391336a6ee6713a0583f8c6240d70863de3 # v1.12.0
with:
node_image: ${{ env.KIND_IMAGE }}
cluster_name: ${{ env.KIND_CLUSTER_NAME }}
config: ./test/kind-conf.yaml
version: ${{ env.KIND_VERSION }}
- name: Build image
run: |
export IMAGE="openkruise/kruise-manager:e2e-${GITHUB_RUN_ID}"
docker build --pull --no-cache . -t $IMAGE
kind load docker-image --name=${KIND_CLUSTER_NAME} $IMAGE || { echo >&2 "kind not installed or error loading image: $IMAGE"; exit 1; }
- name: Install Kruise
run: |
set -ex
kubectl create ns kruise-system
kubectl apply -f test/kruise-e2e-config.yaml
kubectl cluster-info
IMG=openkruise/kruise-manager:e2e-${GITHUB_RUN_ID} ./scripts/deploy_kind.sh
NODES=$(kubectl get node | wc -l)
for ((i=1;i<10;i++));
do
set +e
PODS=$(kubectl get pod -n kruise-system | grep '1/1' | wc -l)
set -e
if [ "$PODS" -eq "$NODES" ]; then
break
fi
sleep 3
done
set +e
PODS=$(kubectl get pod -n kruise-system | grep '1/1' | wc -l)
kubectl get node -o yaml
kubectl get all -n kruise-system -o yaml
kubectl get pod -n kruise-system --no-headers | grep daemon | awk '{print $1}' | xargs kubectl logs -n kruise-system
kubectl get pod -n kruise-system --no-headers | grep daemon | awk '{print $1}' | xargs kubectl logs -n kruise-system --previous=true
set -e
if [ "$PODS" -eq "$NODES" ]; then
echo "Wait for kruise-manager and kruise-daemon ready successfully"
else
echo "Timeout to wait for kruise-manager and kruise-daemon ready"
exit 1
fi
- name: Run E2E Tests
run: |
export KUBECONFIG=/home/runner/.kube/config
make ginkgo
set +e
kubectl apply -f https://raw.githubusercontent.com/kubeflow/training-operator/refs/tags/v1.3.0/manifests/base/crds/kubeflow.org_tfjobs.yaml
./bin/ginkgo -timeout 90m -v --skip='\[apps\] (AppStatefulSetStorage|StatefulSet|PullImage|PullImages|ContainerRecreateRequest|DaemonSet|SidecarSet|EphemeralJob)' --skip='\[policy\] PodUnavailableBudget' test/e2e
retVal=$?
restartCount=$(kubectl get pod -n kruise-system -l control-plane=controller-manager --no-headers | awk '{print $4}')
if [ "${restartCount}" -eq "0" ];then
echo "Kruise-manager has not restarted"
else
kubectl get pod -n kruise-system -l control-plane=controller-manager --no-headers
echo "Kruise-manager has restarted, abort!!!"
kubectl get pod -n kruise-system --no-headers -l control-plane=controller-manager | awk '{print $1}' | xargs kubectl logs -p -n kruise-system
exit 1
fi
kubectl get pods -n kruise-system -l control-plane=daemon -o=jsonpath="{range .items[*]}{.metadata.namespace}{\"\t\"}{.metadata.name}{\"\n\"}{end}" | while read ns name;
do
restartCount=$(kubectl get pod -n ${ns} ${name} --no-headers | awk '{print $4}')
if [ "${restartCount}" -eq "0" ];then
echo "Kruise-daemon has not restarted"
else
kubectl get pods -n ${ns} -l control-plane=daemon --no-headers
echo "Kruise-daemon has restarted, abort!!!"
kubectl logs -p -n ${ns} ${name}
exit 1
fi
done
if [ "$retVal" -ne 0 ];then
echo "test fail, dump kruise-manager logs"
while read pod; do
kubectl logs -n kruise-system $pod
done < <(kubectl get pods -n kruise-system -l control-plane=controller-manager --no-headers | awk '{print $1}')
echo "test fail, dump kruise-daemon logs"
while read pod; do
kubectl logs -n kruise-system $pod
done < <(kubectl get pods -n kruise-system -l control-plane=daemon --no-headers | awk '{print $1}')
fi
exit $retVal

View File

@ -1,113 +0,0 @@
name: E2E-1.20-EphemeralJob
on:
push:
branches:
- master
- release-*
pull_request: {}
workflow_dispatch: {}
# Declare default permissions as read only.
permissions: read-all
env:
# Common versions
GO_VERSION: '1.22'
KIND_VERSION: 'v0.14.0'
KIND_IMAGE: 'kindest/node:v1.20.15'
KIND_CLUSTER_NAME: 'ci-testing'
jobs:
ephemeraljob:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
submodules: true
- name: Setup Go
uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0
with:
go-version: ${{ env.GO_VERSION }}
- name: Setup Kind Cluster
uses: helm/kind-action@a1b0e391336a6ee6713a0583f8c6240d70863de3 # v1.12.0
with:
node_image: ${{ env.KIND_IMAGE }}
cluster_name: ${{ env.KIND_CLUSTER_NAME }}
config: ./test/kind-conf.yaml
version: ${{ env.KIND_VERSION }}
- name: Build image
run: |
export IMAGE="openkruise/kruise-manager:e2e-${GITHUB_RUN_ID}"
docker build --pull --no-cache . -t $IMAGE
kind load docker-image --name=${KIND_CLUSTER_NAME} $IMAGE || { echo >&2 "kind not installed or error loading image: $IMAGE"; exit 1; }
- name: Install Kruise
run: |
set -ex
kubectl cluster-info
IMG=openkruise/kruise-manager:e2e-${GITHUB_RUN_ID} ./scripts/deploy_kind.sh
NODES=$(kubectl get node | wc -l)
for ((i=1;i<10;i++));
do
set +e
PODS=$(kubectl get pod -n kruise-system | grep '1/1' | wc -l)
set -e
if [ "$PODS" -eq "$NODES" ]; then
break
fi
sleep 3
done
set +e
PODS=$(kubectl get pod -n kruise-system | grep '1/1' | wc -l)
kubectl get node -o yaml
kubectl get all -n kruise-system -o yaml
kubectl get pod -n kruise-system --no-headers | grep daemon | awk '{print $1}' | xargs kubectl logs -n kruise-system
kubectl get pod -n kruise-system --no-headers | grep daemon | awk '{print $1}' | xargs kubectl logs -n kruise-system --previous=true
set -e
if [ "$PODS" -eq "$NODES" ]; then
echo "Wait for kruise-manager and kruise-daemon ready successfully"
else
echo "Timeout to wait for kruise-manager and kruise-daemon ready"
exit 1
fi
- name: Run E2E Tests
run: |
export KUBECONFIG=/home/runner/.kube/config
make ginkgo
set +e
./bin/ginkgo -timeout 60m -v --focus='\[apps\] EphemeralJob' test/e2e
retVal=$?
restartCount=$(kubectl get pod -n kruise-system -l control-plane=controller-manager --no-headers | awk '{print $4}')
if [ "${restartCount}" -eq "0" ];then
echo "$out"
echo "Kruise-manager has not restarted"
else
echo "$out"
echo "Kruise-manager has restarted, abort!!!"
kubectl get pod -n kruise-system --no-headers -l control-plane=controller-manager | awk '{print $1}' | xargs kubectl logs -p -n kruise-system
exit 1
fi
kubectl get pods -n kruise-system -l control-plane=daemon -o=jsonpath="{range .items[*]}{.metadata.namespace}{\"\t\"}{.metadata.name}{\"\n\"}{end}" | while read ns name;
do
restartCount=$(kubectl get pod -n ${ns} ${name} --no-headers | awk '{print $4}')
if [ "${restartCount}" -eq "0" ];then
echo "Kruise-daemon has not restarted"
else
kubectl get pods -n ${ns} -l control-plane=daemon --no-headers
echo "Kruise-daemon has restarted, abort!!!"
kubectl logs -p -n ${ns} ${name}
exit 1
fi
done
if [ "$retVal" -ne 0 ];then
echo "test fail, dump kruise-manager logs"
while read pod; do
kubectl logs -n kruise-system $pod
done < <(kubectl get pods -n kruise-system -l control-plane=controller-manager --no-headers | awk '{print $1}')
echo "test fail, dump kruise-daemon logs"
while read pod; do
kubectl logs -n kruise-system $pod
done < <(kubectl get pods -n kruise-system -l control-plane=daemon --no-headers | awk '{print $1}')
fi
exit $retVal

View File

@ -13,7 +13,7 @@ permissions: read-all
env: env:
# Common versions # Common versions
GO_VERSION: '1.22' GO_VERSION: '1.23'
KIND_ACTION_VERSION: 'v1.3.0' KIND_ACTION_VERSION: 'v1.3.0'
KIND_VERSION: 'v0.14.0' KIND_VERSION: 'v0.14.0'
KIND_IMAGE: 'kindest/node:v1.24.6' KIND_IMAGE: 'kindest/node:v1.24.6'
@ -21,13 +21,13 @@ env:
jobs: jobs:
astatefulset-storage: astatefulset-storage:
runs-on: ubuntu-20.04 runs-on: ubuntu-24.04
steps: steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with: with:
submodules: true submodules: true
- name: Setup Go - name: Setup Go
uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0 uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
with: with:
go-version: ${{ env.GO_VERSION }} go-version: ${{ env.GO_VERSION }}
- name: Setup Kind Cluster - name: Setup Kind Cluster
@ -48,69 +48,19 @@ jobs:
kind load docker-image --name=${KIND_CLUSTER_NAME} $IMAGE || { echo >&2 "kind not installed or error loading image: $IMAGE"; exit 1; } kind load docker-image --name=${KIND_CLUSTER_NAME} $IMAGE || { echo >&2 "kind not installed or error loading image: $IMAGE"; exit 1; }
- name: Install Kruise - name: Install Kruise
run: | run: |
set -ex IMG=openkruise/kruise-manager:e2e-${GITHUB_RUN_ID} make install-kruise
kubectl cluster-info
IMG=openkruise/kruise-manager:e2e-${GITHUB_RUN_ID} ./scripts/deploy_kind.sh
NODES=$(kubectl get node | wc -l)
for ((i=1;i<10;i++));
do
set +e
PODS=$(kubectl get pod -n kruise-system | grep '1/1' | wc -l)
set -e
if [ "$PODS" -eq "$NODES" ]; then
break
fi
sleep 3
done
set +e
PODS=$(kubectl get pod -n kruise-system | grep '1/1' | wc -l)
kubectl get node -o yaml
kubectl get all -n kruise-system -o yaml
kubectl get pod -n kruise-system --no-headers | grep daemon | awk '{print $1}' | xargs kubectl logs -n kruise-system
kubectl get pod -n kruise-system --no-headers | grep daemon | awk '{print $1}' | xargs kubectl logs -n kruise-system --previous=true
set -e
if [ "$PODS" -eq "$NODES" ]; then
echo "Wait for kruise-manager and kruise-daemon ready successfully"
else
echo "Timeout to wait for kruise-manager and kruise-daemon ready"
exit 1
fi
- name: Run E2E Tests - name: Run E2E Tests
run: | run: |
export KUBECONFIG=/home/runner/.kube/config export KUBECONFIG=/home/runner/.kube/config
make ginkgo tools/hack/run-kruise-e2e-test.sh --focus 'VolumeExpansion' --print-info
set +e
./bin/ginkgo -timeout 60m -p -v --focus='\[apps\] AppStatefulSetStorage' test/e2e
retVal=$?
restartCount=$(kubectl get pod -n kruise-system -l control-plane=controller-manager --no-headers | awk '{print $4}')
if [ "${restartCount}" -eq "0" ];then
echo "Kruise-manager has not restarted"
else
kubectl get pod -n kruise-system -l control-plane=controller-manager --no-headers
echo "Kruise-manager has restarted, abort!!!"
kubectl get pod -n kruise-system --no-headers -l control-plane=controller-manager | awk '{print $1}' | xargs kubectl logs -p -n kruise-system
exit 1
fi
if [ "$retVal" -ne 0 ];then
echo "test fail, dump kruise-manager logs"
while read pod; do
kubectl logs -n kruise-system $pod
done < <(kubectl get pods -n kruise-system -l control-plane=controller-manager --no-headers | awk '{print $1}')
echo "test fail, dump kruise-daemon logs"
while read pod; do
kubectl logs -n kruise-system $pod
done < <(kubectl get pods -n kruise-system -l control-plane=daemon --no-headers | awk '{print $1}')
fi
exit $retVal
astatefulset: astatefulset:
runs-on: ubuntu-20.04 runs-on: ubuntu-24.04
steps: steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with: with:
submodules: true submodules: true
- name: Setup Go - name: Setup Go
uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0 uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
with: with:
go-version: ${{ env.GO_VERSION }} go-version: ${{ env.GO_VERSION }}
- name: Setup Kind Cluster - name: Setup Kind Cluster
@ -127,69 +77,54 @@ jobs:
kind load docker-image --name=${KIND_CLUSTER_NAME} $IMAGE || { echo >&2 "kind not installed or error loading image: $IMAGE"; exit 1; } kind load docker-image --name=${KIND_CLUSTER_NAME} $IMAGE || { echo >&2 "kind not installed or error loading image: $IMAGE"; exit 1; }
- name: Install Kruise - name: Install Kruise
run: | run: |
set -ex IMG=openkruise/kruise-manager:e2e-${GITHUB_RUN_ID} make install-kruise
kubectl cluster-info
IMG=openkruise/kruise-manager:e2e-${GITHUB_RUN_ID} ./scripts/deploy_kind.sh
NODES=$(kubectl get node | wc -l)
for ((i=1;i<10;i++));
do
set +e
PODS=$(kubectl get pod -n kruise-system | grep '1/1' | wc -l)
set -e
if [ "$PODS" -eq "$NODES" ]; then
break
fi
sleep 3
done
set +e
PODS=$(kubectl get pod -n kruise-system | grep '1/1' | wc -l)
kubectl get node -o yaml
kubectl get all -n kruise-system -o yaml
kubectl get pod -n kruise-system --no-headers | grep daemon | awk '{print $1}' | xargs kubectl logs -n kruise-system
kubectl get pod -n kruise-system --no-headers | grep daemon | awk '{print $1}' | xargs kubectl logs -n kruise-system --previous=true
set -e
if [ "$PODS" -eq "$NODES" ]; then
echo "Wait for kruise-manager and kruise-daemon ready successfully"
else
echo "Timeout to wait for kruise-manager and kruise-daemon ready"
exit 1
fi
- name: Run E2E Tests - name: Run E2E Tests
run: | run: |
export KUBECONFIG=/home/runner/.kube/config export KUBECONFIG=/home/runner/.kube/config
make ginkgo tools/hack/run-kruise-e2e-test.sh --focus 'StatefulSet' --print-info
set +e
./bin/ginkgo -timeout 60m -v --focus='\[apps\] StatefulSet' test/e2e
retVal=$?
restartCount=$(kubectl get pod -n kruise-system -l control-plane=controller-manager --no-headers | awk '{print $4}')
if [ "${restartCount}" -eq "0" ];then
echo "Kruise-manager has not restarted"
else
kubectl get pod -n kruise-system -l control-plane=controller-manager --no-headers
echo "Kruise-manager has restarted, abort!!!"
kubectl get pod -n kruise-system --no-headers -l control-plane=controller-manager | awk '{print $1}' | xargs kubectl logs -p -n kruise-system
exit 1
fi
if [ "$retVal" -ne 0 ];then
echo "test fail, dump kruise-manager logs"
while read pod; do
kubectl logs -n kruise-system $pod
done < <(kubectl get pods -n kruise-system -l control-plane=controller-manager --no-headers | awk '{print $1}')
echo "test fail, dump kruise-daemon logs"
while read pod; do
kubectl logs -n kruise-system $pod
done < <(kubectl get pods -n kruise-system -l control-plane=daemon --no-headers | awk '{print $1}')
fi
exit $retVal
pullimages-containerrecreate: cloneset:
runs-on: ubuntu-20.04 runs-on: ubuntu-24.04
steps: steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with: with:
submodules: true submodules: true
- name: Setup Go - name: Setup Go
uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0 uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
with:
go-version: ${{ env.GO_VERSION }}
- name: Setup Kind Cluster
uses: helm/kind-action@a1b0e391336a6ee6713a0583f8c6240d70863de3 # v1.12.0
with:
node_image: ${{ env.KIND_IMAGE }}
cluster_name: ${{ env.KIND_CLUSTER_NAME }}
config: ./test/kind-conf.yaml
version: ${{ env.KIND_VERSION }}
- name: Install-CSI
run: |
make install-csi
- name: Build image
run: |
export IMAGE="openkruise/kruise-manager:e2e-${GITHUB_RUN_ID}"
docker build --pull --no-cache . -t $IMAGE
kind load docker-image --name=${KIND_CLUSTER_NAME} $IMAGE || { echo >&2 "kind not installed or error loading image: $IMAGE"; exit 1; }
- name: Install Kruise
run: |
IMG=openkruise/kruise-manager:e2e-${GITHUB_RUN_ID} make install-kruise
- name: Run E2E Tests
run: |
export KUBECONFIG=/home/runner/.kube/config
tools/hack/run-kruise-e2e-test.sh --focus '(CloneSet|ContainerMeta)' --print-info
operation:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
submodules: true
- name: Setup Go
uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
with: with:
go-version: ${{ env.GO_VERSION }} go-version: ${{ env.GO_VERSION }}
- name: Setup Kind Cluster - name: Setup Kind Cluster
@ -206,82 +141,20 @@ jobs:
kind load docker-image --name=${KIND_CLUSTER_NAME} $IMAGE || { echo >&2 "kind not installed or error loading image: $IMAGE"; exit 1; } kind load docker-image --name=${KIND_CLUSTER_NAME} $IMAGE || { echo >&2 "kind not installed or error loading image: $IMAGE"; exit 1; }
- name: Install Kruise - name: Install Kruise
run: | run: |
set -ex IMG=openkruise/kruise-manager:e2e-${GITHUB_RUN_ID} make install-kruise
kubectl cluster-info
IMG=openkruise/kruise-manager:e2e-${GITHUB_RUN_ID} ./scripts/deploy_kind.sh
NODES=$(kubectl get node | wc -l)
for ((i=1;i<10;i++));
do
set +e
PODS=$(kubectl get pod -n kruise-system | grep '1/1' | wc -l)
set -e
if [ "$PODS" -eq "$NODES" ]; then
break
fi
sleep 3
done
set +e
PODS=$(kubectl get pod -n kruise-system | grep '1/1' | wc -l)
kubectl get node -o yaml
kubectl get all -n kruise-system -o yaml
kubectl get pod -n kruise-system --no-headers | grep daemon | awk '{print $1}' | xargs kubectl logs -n kruise-system
kubectl get pod -n kruise-system --no-headers | grep daemon | awk '{print $1}' | xargs kubectl logs -n kruise-system --previous=true
set -e
if [ "$PODS" -eq "$NODES" ]; then
echo "Wait for kruise-manager and kruise-daemon ready successfully"
else
echo "Timeout to wait for kruise-manager and kruise-daemon ready"
exit 1
fi
- name: Run E2E Tests - name: Run E2E Tests
run: | run: |
export KUBECONFIG=/home/runner/.kube/config export KUBECONFIG=/home/runner/.kube/config
make ginkgo tools/hack/run-kruise-e2e-test.sh --focus '(PullImage|ContainerRecreateRequest|PullImages|ResourceDistribution|PersistentPodState|PodProbeMarker)' --print-info
set +e
./bin/ginkgo -timeout 60m -v --focus='\[apps\] (PullImage|ContainerRecreateRequest|PullImages)' test/e2e
retVal=$?
restartCount=$(kubectl get pod -n kruise-system -l control-plane=controller-manager --no-headers | awk '{print $4}')
if [ "${restartCount}" -eq "0" ];then
echo "Kruise-manager has not restarted"
else
kubectl get pod -n kruise-system -l control-plane=controller-manager --no-headers
echo "Kruise-manager has restarted, abort!!!"
kubectl get pod -n kruise-system --no-headers -l control-plane=controller-manager | awk '{print $1}' | xargs kubectl logs -p -n kruise-system
exit 1
fi
kubectl get pods -n kruise-system -l control-plane=daemon -o=jsonpath="{range .items[*]}{.metadata.namespace}{\"\t\"}{.metadata.name}{\"\n\"}{end}" | while read ns name;
do
restartCount=$(kubectl get pod -n ${ns} ${name} --no-headers | awk '{print $4}')
if [ "${restartCount}" -eq "0" ];then
echo "Kruise-daemon has not restarted"
else
kubectl get pods -n ${ns} -l control-plane=daemon --no-headers
echo "Kruise-daemon has restarted, abort!!!"
kubectl logs -p -n ${ns} ${name}
exit 1
fi
done
if [ "$retVal" -ne 0 ];then
echo "test fail, dump kruise-manager logs"
while read pod; do
kubectl logs -n kruise-system $pod
done < <(kubectl get pods -n kruise-system -l control-plane=controller-manager --no-headers | awk '{print $1}')
echo "test fail, dump kruise-daemon logs"
while read pod; do
kubectl logs -n kruise-system $pod
done < <(kubectl get pods -n kruise-system -l control-plane=daemon --no-headers | awk '{print $1}')
fi
exit $retVal
advanced-daemonset: advanced-daemonset:
runs-on: ubuntu-20.04 runs-on: ubuntu-24.04
steps: steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with: with:
submodules: true submodules: true
- name: Setup Go - name: Setup Go
uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0 uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
with: with:
go-version: ${{ env.GO_VERSION }} go-version: ${{ env.GO_VERSION }}
- name: Setup Kind Cluster - name: Setup Kind Cluster
@ -298,82 +171,20 @@ jobs:
kind load docker-image --name=${KIND_CLUSTER_NAME} $IMAGE || { echo >&2 "kind not installed or error loading image: $IMAGE"; exit 1; } kind load docker-image --name=${KIND_CLUSTER_NAME} $IMAGE || { echo >&2 "kind not installed or error loading image: $IMAGE"; exit 1; }
- name: Install Kruise - name: Install Kruise
run: | run: |
set -ex IMG=openkruise/kruise-manager:e2e-${GITHUB_RUN_ID} make install-kruise
kubectl cluster-info
IMG=openkruise/kruise-manager:e2e-${GITHUB_RUN_ID} ./scripts/deploy_kind.sh
NODES=$(kubectl get node | wc -l)
for ((i=1;i<10;i++));
do
set +e
PODS=$(kubectl get pod -n kruise-system | grep '1/1' | wc -l)
set -e
if [ "$PODS" -eq "$NODES" ]; then
break
fi
sleep 3
done
set +e
PODS=$(kubectl get pod -n kruise-system | grep '1/1' | wc -l)
kubectl get node -o yaml
kubectl get all -n kruise-system -o yaml
kubectl get pod -n kruise-system --no-headers | grep daemon | awk '{print $1}' | xargs kubectl logs -n kruise-system
kubectl get pod -n kruise-system --no-headers | grep daemon | awk '{print $1}' | xargs kubectl logs -n kruise-system --previous=true
set -e
if [ "$PODS" -eq "$NODES" ]; then
echo "Wait for kruise-manager and kruise-daemon ready successfully"
else
echo "Timeout to wait for kruise-manager and kruise-daemon ready"
exit 1
fi
- name: Run E2E Tests - name: Run E2E Tests
run: | run: |
export KUBECONFIG=/home/runner/.kube/config export KUBECONFIG=/home/runner/.kube/config
make ginkgo tools/hack/run-kruise-e2e-test.sh --focus 'DaemonSet' --print-info
set +e
./bin/ginkgo -timeout 60m -v --focus='\[apps\] DaemonSet' test/e2e
retVal=$?
restartCount=$(kubectl get pod -n kruise-system -l control-plane=controller-manager --no-headers | awk '{print $4}')
if [ "${restartCount}" -eq "0" ];then
echo "Kruise-manager has not restarted"
else
kubectl get pod -n kruise-system -l control-plane=controller-manager --no-headers
echo "Kruise-manager has restarted, abort!!!"
kubectl get pod -n kruise-system --no-headers -l control-plane=controller-manager | awk '{print $1}' | xargs kubectl logs -p -n kruise-system
exit 1
fi
kubectl get pods -n kruise-system -l control-plane=daemon -o=jsonpath="{range .items[*]}{.metadata.namespace}{\"\t\"}{.metadata.name}{\"\n\"}{end}" | while read ns name;
do
restartCount=$(kubectl get pod -n ${ns} ${name} --no-headers | awk '{print $4}')
if [ "${restartCount}" -eq "0" ];then
echo "Kruise-daemon has not restarted"
else
kubectl get pods -n ${ns} -l control-plane=daemon --no-headers
echo "Kruise-daemon has restarted, abort!!!"
kubectl logs -p -n ${ns} ${name}
exit 1
fi
done
if [ "$retVal" -ne 0 ];then
echo "test fail, dump kruise-manager logs"
while read pod; do
kubectl logs -n kruise-system $pod
done < <(kubectl get pods -n kruise-system -l control-plane=controller-manager --no-headers | awk '{print $1}')
echo "test fail, dump kruise-daemon logs"
while read pod; do
kubectl logs -n kruise-system $pod
done < <(kubectl get pods -n kruise-system -l control-plane=daemon --no-headers | awk '{print $1}')
fi
exit $retVal
sidecarset: sidecar:
runs-on: ubuntu-20.04 runs-on: ubuntu-24.04
steps: steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with: with:
submodules: true submodules: true
- name: Setup Go - name: Setup Go
uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0 uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
with: with:
go-version: ${{ env.GO_VERSION }} go-version: ${{ env.GO_VERSION }}
- name: Setup Kind Cluster - name: Setup Kind Cluster
@ -390,82 +201,20 @@ jobs:
kind load docker-image --name=${KIND_CLUSTER_NAME} $IMAGE || { echo >&2 "kind not installed or error loading image: $IMAGE"; exit 1; } kind load docker-image --name=${KIND_CLUSTER_NAME} $IMAGE || { echo >&2 "kind not installed or error loading image: $IMAGE"; exit 1; }
- name: Install Kruise - name: Install Kruise
run: | run: |
set -ex IMG=openkruise/kruise-manager:e2e-${GITHUB_RUN_ID} make install-kruise
kubectl cluster-info
IMG=openkruise/kruise-manager:e2e-${GITHUB_RUN_ID} ./scripts/deploy_kind.sh
NODES=$(kubectl get node | wc -l)
for ((i=1;i<10;i++));
do
set +e
PODS=$(kubectl get pod -n kruise-system | grep '1/1' | wc -l)
set -e
if [ "$PODS" -eq "$NODES" ]; then
break
fi
sleep 3
done
set +e
PODS=$(kubectl get pod -n kruise-system | grep '1/1' | wc -l)
kubectl get node -o yaml
kubectl get all -n kruise-system -o yaml
kubectl get pod -n kruise-system --no-headers | grep daemon | awk '{print $1}' | xargs kubectl logs -n kruise-system
kubectl get pod -n kruise-system --no-headers | grep daemon | awk '{print $1}' | xargs kubectl logs -n kruise-system --previous=true
set -e
if [ "$PODS" -eq "$NODES" ]; then
echo "Wait for kruise-manager and kruise-daemon ready successfully"
else
echo "Timeout to wait for kruise-manager and kruise-daemon ready"
exit 1
fi
- name: Run E2E Tests - name: Run E2E Tests
run: | run: |
export KUBECONFIG=/home/runner/.kube/config export KUBECONFIG=/home/runner/.kube/config
make ginkgo tools/hack/run-kruise-e2e-test.sh --focus 'SidecarSet|SidecarTerminator|ContainerPriority' --print-info
set +e
./bin/ginkgo -timeout 60m -v --focus='\[apps\] SidecarSet' test/e2e
retVal=$?
restartCount=$(kubectl get pod -n kruise-system -l control-plane=controller-manager --no-headers | awk '{print $4}')
if [ "${restartCount}" -eq "0" ];then
echo "Kruise-manager has not restarted"
else
kubectl get pod -n kruise-system -l control-plane=controller-manager --no-headers
echo "Kruise-manager has restarted, abort!!!"
kubectl get pod -n kruise-system --no-headers -l control-plane=controller-manager | awk '{print $1}' | xargs kubectl logs -p -n kruise-system
exit 1
fi
kubectl get pods -n kruise-system -l control-plane=daemon -o=jsonpath="{range .items[*]}{.metadata.namespace}{\"\t\"}{.metadata.name}{\"\n\"}{end}" | while read ns name;
do
restartCount=$(kubectl get pod -n ${ns} ${name} --no-headers | awk '{print $4}')
if [ "${restartCount}" -eq "0" ];then
echo "Kruise-daemon has not restarted"
else
kubectl get pods -n ${ns} -l control-plane=daemon --no-headers
echo "Kruise-daemon has restarted, abort!!!"
kubectl logs -p -n ${ns} ${name}
exit 1
fi
done
if [ "$retVal" -ne 0 ];then
echo "test fail, dump kruise-manager logs"
while read pod; do
kubectl logs -n kruise-system $pod
done < <(kubectl get pods -n kruise-system -l control-plane=controller-manager --no-headers | awk '{print $1}')
echo "test fail, dump kruise-daemon logs"
while read pod; do
kubectl logs -n kruise-system $pod
done < <(kubectl get pods -n kruise-system -l control-plane=daemon --no-headers | awk '{print $1}')
fi
exit $retVal
ephemeraljob: job-workload:
runs-on: ubuntu-20.04 runs-on: ubuntu-24.04
steps: steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with: with:
submodules: true submodules: true
- name: Setup Go - name: Setup Go
uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0 uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
with: with:
go-version: ${{ env.GO_VERSION }} go-version: ${{ env.GO_VERSION }}
- name: Setup Kind Cluster - name: Setup Kind Cluster
@ -482,208 +231,68 @@ jobs:
kind load docker-image --name=${KIND_CLUSTER_NAME} $IMAGE || { echo >&2 "kind not installed or error loading image: $IMAGE"; exit 1; } kind load docker-image --name=${KIND_CLUSTER_NAME} $IMAGE || { echo >&2 "kind not installed or error loading image: $IMAGE"; exit 1; }
- name: Install Kruise - name: Install Kruise
run: | run: |
set -ex IMG=openkruise/kruise-manager:e2e-${GITHUB_RUN_ID} make install-kruise
kubectl cluster-info
IMG=openkruise/kruise-manager:e2e-${GITHUB_RUN_ID} ./scripts/deploy_kind.sh
NODES=$(kubectl get node | wc -l)
for ((i=1;i<10;i++));
do
set +e
PODS=$(kubectl get pod -n kruise-system | grep '1/1' | wc -l)
set -e
if [ "$PODS" -eq "$NODES" ]; then
break
fi
sleep 3
done
set +e
PODS=$(kubectl get pod -n kruise-system | grep '1/1' | wc -l)
kubectl get node -o yaml
kubectl get all -n kruise-system -o yaml
kubectl get pod -n kruise-system --no-headers | grep daemon | awk '{print $1}' | xargs kubectl logs -n kruise-system
kubectl get pod -n kruise-system --no-headers | grep daemon | awk '{print $1}' | xargs kubectl logs -n kruise-system --previous=true
set -e
if [ "$PODS" -eq "$NODES" ]; then
echo "Wait for kruise-manager and kruise-daemon ready successfully"
else
echo "Timeout to wait for kruise-manager and kruise-daemon ready"
exit 1
fi
- name: Run E2E Tests - name: Run E2E Tests
run: | run: |
export KUBECONFIG=/home/runner/.kube/config export KUBECONFIG=/home/runner/.kube/config
make ginkgo tools/hack/run-kruise-e2e-test.sh --focus '(EphemeralJob|BroadcastJob)' --print-info
set +e
./bin/ginkgo -timeout 60m -v --focus='\[apps\] EphemeralJob' test/e2e
retVal=$?
if [ "$retVal" -ne 0 ];then
echo "test fail, dump kruise-manager logs"
while read pod; do
kubectl logs -n kruise-system $pod
done < <(kubectl get pods -n kruise-system -l control-plane=controller-manager --no-headers | awk '{print $1}')
echo "test fail, dump kruise-daemon logs"
while read pod; do
kubectl logs -n kruise-system $pod
done < <(kubectl get pods -n kruise-system -l control-plane=daemon --no-headers | awk '{print $1}')
fi
exit $retVal
podUnavailableBudget:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
submodules: true
- name: Setup Go
uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0
with:
go-version: ${{ env.GO_VERSION }}
- name: Setup Kind Cluster
uses: helm/kind-action@a1b0e391336a6ee6713a0583f8c6240d70863de3 # v1.12.0
with:
node_image: ${{ env.KIND_IMAGE }}
cluster_name: ${{ env.KIND_CLUSTER_NAME }}
config: ./test/kind-conf.yaml
version: ${{ env.KIND_VERSION }}
- name: Build image
run: |
export IMAGE="openkruise/kruise-manager:e2e-${GITHUB_RUN_ID}"
docker build --pull --no-cache . -t $IMAGE
kind load docker-image --name=${KIND_CLUSTER_NAME} $IMAGE || { echo >&2 "kind not installed or error loading image: $IMAGE"; exit 1; }
- name: Install Kruise
run: |
set -ex
kubectl cluster-info
IMG=openkruise/kruise-manager:e2e-${GITHUB_RUN_ID} ./scripts/deploy_kind.sh
NODES=$(kubectl get node | wc -l)
for ((i=1;i<10;i++));
do
set +e
PODS=$(kubectl get pod -n kruise-system | grep '1/1' | wc -l)
set -e
if [ "$PODS" -eq "$NODES" ]; then
break
fi
sleep 3
done
set +e
PODS=$(kubectl get pod -n kruise-system | grep '1/1' | wc -l)
kubectl get node -o yaml
kubectl get all -n kruise-system -o yaml
kubectl get pod -n kruise-system --no-headers | grep daemon | awk '{print $1}' | xargs kubectl logs -n kruise-system
kubectl get pod -n kruise-system --no-headers | grep daemon | awk '{print $1}' | xargs kubectl logs -n kruise-system --previous=true
set -e
if [ "$PODS" -eq "$NODES" ]; then
echo "Wait for kruise-manager and kruise-daemon ready successfully"
else
echo "Timeout to wait for kruise-manager and kruise-daemon ready"
exit 1
fi
- name: Run E2E Tests
run: |
export KUBECONFIG=/home/runner/.kube/config
make ginkgo
set +e
./bin/ginkgo -timeout 60m -v --focus='\[policy\] PodUnavailableBudget' test/e2e
retVal=$?
if [ "$retVal" -ne 0 ];then
echo "test fail, dump kruise-manager logs"
while read pod; do
kubectl logs -n kruise-system $pod
done < <(kubectl get pods -n kruise-system -l control-plane=controller-manager --no-headers | awk '{print $1}')
fi
exit $retVal
other:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
submodules: true
- name: Setup Go
uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0
with:
go-version: ${{ env.GO_VERSION }}
- name: Setup Kind Cluster
uses: helm/kind-action@a1b0e391336a6ee6713a0583f8c6240d70863de3 # v1.12.0
with:
node_image: ${{ env.KIND_IMAGE }}
cluster_name: ${{ env.KIND_CLUSTER_NAME }}
config: ./test/kind-conf.yaml
version: ${{ env.KIND_VERSION }}
- name: Build image
run: |
export IMAGE="openkruise/kruise-manager:e2e-${GITHUB_RUN_ID}"
docker build --pull --no-cache . -t $IMAGE
kind load docker-image --name=${KIND_CLUSTER_NAME} $IMAGE || { echo >&2 "kind not installed or error loading image: $IMAGE"; exit 1; }
- name: Install Kruise
run: |
set -ex
kubectl create ns kruise-system
kubectl apply -f test/kruise-e2e-config.yaml
kubectl cluster-info
IMG=openkruise/kruise-manager:e2e-${GITHUB_RUN_ID} ./scripts/deploy_kind.sh
NODES=$(kubectl get node | wc -l)
for ((i=1;i<10;i++));
do
set +e
PODS=$(kubectl get pod -n kruise-system | grep '1/1' | wc -l)
set -e
if [ "$PODS" -eq "$NODES" ]; then
break
fi
sleep 3
done
set +e
PODS=$(kubectl get pod -n kruise-system | grep '1/1' | wc -l)
kubectl get node -o yaml
kubectl get all -n kruise-system -o yaml
kubectl get pod -n kruise-system --no-headers | grep daemon | awk '{print $1}' | xargs kubectl logs -n kruise-system
kubectl get pod -n kruise-system --no-headers | grep daemon | awk '{print $1}' | xargs kubectl logs -n kruise-system --previous=true
set -e
if [ "$PODS" -eq "$NODES" ]; then
echo "Wait for kruise-manager and kruise-daemon ready successfully"
else
echo "Timeout to wait for kruise-manager and kruise-daemon ready"
exit 1
fi
- name: Run E2E Tests
run: |
export KUBECONFIG=/home/runner/.kube/config
make ginkgo
set +e
kubectl apply -f https://raw.githubusercontent.com/kubeflow/training-operator/refs/heads/v1.8-branch/manifests/base/crds/kubeflow.org_tfjobs.yaml
./bin/ginkgo -timeout 90m -v --skip='\[apps\] (AppStatefulSetStorage|StatefulSet|PullImage|PullImages|ContainerRecreateRequest|DaemonSet|SidecarSet|EphemeralJob)' --skip='\[policy\] PodUnavailableBudget' test/e2e
retVal=$?
restartCount=$(kubectl get pod -n kruise-system -l control-plane=controller-manager --no-headers | awk '{print $4}')
if [ "${restartCount}" -eq "0" ];then
echo "Kruise-manager has not restarted"
else
kubectl get pod -n kruise-system -l control-plane=controller-manager --no-headers
echo "Kruise-manager has restarted, abort!!!"
kubectl get pod -n kruise-system --no-headers -l control-plane=controller-manager | awk '{print $1}' | xargs kubectl logs -p -n kruise-system
exit 1
fi
kubectl get pods -n kruise-system -l control-plane=daemon -o=jsonpath="{range .items[*]}{.metadata.namespace}{\"\t\"}{.metadata.name}{\"\n\"}{end}" | while read ns name;
do
restartCount=$(kubectl get pod -n ${ns} ${name} --no-headers | awk '{print $4}')
if [ "${restartCount}" -eq "0" ];then
echo "Kruise-daemon has not restarted"
else
kubectl get pods -n ${ns} -l control-plane=daemon --no-headers
echo "Kruise-daemon has restarted, abort!!!"
kubectl logs -p -n ${ns} ${name}
exit 1
fi
done
if [ "${retVal}" -ne 0 ];then
echo "test fail, dump kruise-manager logs"
while read pod; do
kubectl logs -n kruise-system $pod
done < <(kubectl get pods -n kruise-system -l control-plane=controller-manager --no-headers | awk '{print $1}')
echo "test fail, dump kruise-daemon logs"
while read pod; do
kubectl logs -n kruise-system $pod
done < <(kubectl get pods -n kruise-system -l control-plane=daemon --no-headers | awk '{print $1}')
fi
exit $retVal policy:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
submodules: true
- name: Setup Go
uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
with:
go-version: ${{ env.GO_VERSION }}
- name: Setup Kind Cluster
uses: helm/kind-action@a1b0e391336a6ee6713a0583f8c6240d70863de3 # v1.12.0
with:
node_image: ${{ env.KIND_IMAGE }}
cluster_name: ${{ env.KIND_CLUSTER_NAME }}
config: ./test/kind-conf.yaml
version: ${{ env.KIND_VERSION }}
- name: Build image
run: |
export IMAGE="openkruise/kruise-manager:e2e-${GITHUB_RUN_ID}"
docker build --pull --no-cache . -t $IMAGE
kind load docker-image --name=${KIND_CLUSTER_NAME} $IMAGE || { echo >&2 "kind not installed or error loading image: $IMAGE"; exit 1; }
- name: Install Kruise
run: |
IMG=openkruise/kruise-manager:e2e-${GITHUB_RUN_ID} make install-kruise
- name: Run E2E Tests
run: |
export KUBECONFIG=/home/runner/.kube/config
tools/hack/run-kruise-e2e-test.sh --focus '(PodUnavailableBudget|DeletionProtection)' --print-info
multidomain:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
submodules: true
- name: Setup Go
uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
with:
go-version: ${{ env.GO_VERSION }}
- name: Setup Kind Cluster
uses: helm/kind-action@a1b0e391336a6ee6713a0583f8c6240d70863de3 # v1.12.0
with:
node_image: ${{ env.KIND_IMAGE }}
cluster_name: ${{ env.KIND_CLUSTER_NAME }}
config: ./test/kind-conf.yaml
version: ${{ env.KIND_VERSION }}
- name: Build image
run: |
export IMAGE="openkruise/kruise-manager:e2e-${GITHUB_RUN_ID}"
docker build --pull --no-cache . -t $IMAGE
kind load docker-image --name=${KIND_CLUSTER_NAME} $IMAGE || { echo >&2 "kind not installed or error loading image: $IMAGE"; exit 1; }
- name: Install Kruise
run: |
ENABLE_E2E_CONFIG=true IMG=openkruise/kruise-manager:e2e-${GITHUB_RUN_ID} make install-kruise
- name: Run E2E Tests
run: |
export KUBECONFIG=/home/runner/.kube/config
tools/hack/run-kruise-e2e-test.sh --focus '(UnitedDeployment|WorkloadSpread)' --print-info

View File

@ -13,20 +13,20 @@ permissions: read-all
env: env:
# Common versions # Common versions
GO_VERSION: '1.22' GO_VERSION: '1.23'
KIND_VERSION: 'v0.18.0' KIND_VERSION: 'v0.18.0'
KIND_IMAGE: 'kindest/node:v1.26.3' KIND_IMAGE: 'kindest/node:v1.26.3'
KIND_CLUSTER_NAME: 'ci-testing' KIND_CLUSTER_NAME: 'ci-testing'
jobs: jobs:
astatefulset-storage: astatefulset-storage:
runs-on: ubuntu-20.04 runs-on: ubuntu-24.04
steps: steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with: with:
submodules: true submodules: true
- name: Setup Go - name: Setup Go
uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0 uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
with: with:
go-version: ${{ env.GO_VERSION }} go-version: ${{ env.GO_VERSION }}
- name: Setup Kind Cluster - name: Setup Kind Cluster
@ -47,69 +47,19 @@ jobs:
kind load docker-image --name=${KIND_CLUSTER_NAME} $IMAGE || { echo >&2 "kind not installed or error loading image: $IMAGE"; exit 1; } kind load docker-image --name=${KIND_CLUSTER_NAME} $IMAGE || { echo >&2 "kind not installed or error loading image: $IMAGE"; exit 1; }
- name: Install Kruise - name: Install Kruise
run: | run: |
set -ex IMG=openkruise/kruise-manager:e2e-${GITHUB_RUN_ID} make install-kruise
kubectl cluster-info
IMG=openkruise/kruise-manager:e2e-${GITHUB_RUN_ID} ./scripts/deploy_kind.sh
NODES=$(kubectl get node | wc -l)
for ((i=1;i<10;i++));
do
set +e
PODS=$(kubectl get pod -n kruise-system | grep '1/1' | wc -l)
set -e
if [ "$PODS" -eq "$NODES" ]; then
break
fi
sleep 3
done
set +e
PODS=$(kubectl get pod -n kruise-system | grep '1/1' | wc -l)
kubectl get node -o yaml
kubectl get all -n kruise-system -o yaml
kubectl get pod -n kruise-system --no-headers | grep daemon | awk '{print $1}' | xargs kubectl logs -n kruise-system
kubectl get pod -n kruise-system --no-headers | grep daemon | awk '{print $1}' | xargs kubectl logs -n kruise-system --previous=true
set -e
if [ "$PODS" -eq "$NODES" ]; then
echo "Wait for kruise-manager and kruise-daemon ready successfully"
else
echo "Timeout to wait for kruise-manager and kruise-daemon ready"
exit 1
fi
- name: Run E2E Tests - name: Run E2E Tests
run: | run: |
export KUBECONFIG=/home/runner/.kube/config export KUBECONFIG=/home/runner/.kube/config
make ginkgo tools/hack/run-kruise-e2e-test.sh --focus 'VolumeExpansion' --print-info
set +e
./bin/ginkgo -timeout 60m -p -v --focus='\[apps\] AppStatefulSetStorage' test/e2e
retVal=$?
restartCount=$(kubectl get pod -n kruise-system -l control-plane=controller-manager --no-headers | awk '{print $4}')
if [ "${restartCount}" -eq "0" ];then
echo "Kruise-manager has not restarted"
else
kubectl get pod -n kruise-system -l control-plane=controller-manager --no-headers
echo "Kruise-manager has restarted, abort!!!"
kubectl get pod -n kruise-system --no-headers -l control-plane=controller-manager | awk '{print $1}' | xargs kubectl logs -p -n kruise-system
exit 1
fi
if [ "$retVal" -ne 0 ];then
echo "test fail, dump kruise-manager logs"
while read pod; do
kubectl logs -n kruise-system $pod
done < <(kubectl get pods -n kruise-system -l control-plane=controller-manager --no-headers | awk '{print $1}')
echo "test fail, dump kruise-daemon logs"
while read pod; do
kubectl logs -n kruise-system $pod
done < <(kubectl get pods -n kruise-system -l control-plane=daemon --no-headers | awk '{print $1}')
fi
exit $retVal
astatefulset: astatefulset:
runs-on: ubuntu-20.04 runs-on: ubuntu-24.04
steps: steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with: with:
submodules: true submodules: true
- name: Setup Go - name: Setup Go
uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0 uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
with: with:
go-version: ${{ env.GO_VERSION }} go-version: ${{ env.GO_VERSION }}
- name: Setup Kind Cluster - name: Setup Kind Cluster
@ -126,69 +76,53 @@ jobs:
kind load docker-image --name=${KIND_CLUSTER_NAME} $IMAGE || { echo >&2 "kind not installed or error loading image: $IMAGE"; exit 1; } kind load docker-image --name=${KIND_CLUSTER_NAME} $IMAGE || { echo >&2 "kind not installed or error loading image: $IMAGE"; exit 1; }
- name: Install Kruise - name: Install Kruise
run: | run: |
set -ex IMG=openkruise/kruise-manager:e2e-${GITHUB_RUN_ID} make install-kruise
kubectl cluster-info
IMG=openkruise/kruise-manager:e2e-${GITHUB_RUN_ID} ./scripts/deploy_kind.sh
NODES=$(kubectl get node | wc -l)
for ((i=1;i<10;i++));
do
set +e
PODS=$(kubectl get pod -n kruise-system | grep '1/1' | wc -l)
set -e
if [ "$PODS" -eq "$NODES" ]; then
break
fi
sleep 3
done
set +e
PODS=$(kubectl get pod -n kruise-system | grep '1/1' | wc -l)
kubectl get node -o yaml
kubectl get all -n kruise-system -o yaml
kubectl get pod -n kruise-system --no-headers | grep daemon | awk '{print $1}' | xargs kubectl logs -n kruise-system
kubectl get pod -n kruise-system --no-headers | grep daemon | awk '{print $1}' | xargs kubectl logs -n kruise-system --previous=true
set -e
if [ "$PODS" -eq "$NODES" ]; then
echo "Wait for kruise-manager and kruise-daemon ready successfully"
else
echo "Timeout to wait for kruise-manager and kruise-daemon ready"
exit 1
fi
- name: Run E2E Tests - name: Run E2E Tests
run: | run: |
export KUBECONFIG=/home/runner/.kube/config export KUBECONFIG=/home/runner/.kube/config
make ginkgo tools/hack/run-kruise-e2e-test.sh --focus 'StatefulSet' --print-info
set +e cloneset:
./bin/ginkgo -timeout 60m -v --focus='\[apps\] StatefulSet' test/e2e runs-on: ubuntu-24.04
retVal=$? steps:
restartCount=$(kubectl get pod -n kruise-system -l control-plane=controller-manager --no-headers | awk '{print $4}') - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
if [ "${restartCount}" -eq "0" ];then with:
echo "Kruise-manager has not restarted" submodules: true
else - name: Setup Go
kubectl get pod -n kruise-system -l control-plane=controller-manager --no-headers uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
echo "Kruise-manager has restarted, abort!!!" with:
kubectl get pod -n kruise-system --no-headers -l control-plane=controller-manager | awk '{print $1}' | xargs kubectl logs -p -n kruise-system go-version: ${{ env.GO_VERSION }}
exit 1 - name: Setup Kind Cluster
fi uses: helm/kind-action@a1b0e391336a6ee6713a0583f8c6240d70863de3 # v1.12.0
if [ "$retVal" -ne 0 ];then with:
echo "test fail, dump kruise-manager logs" node_image: ${{ env.KIND_IMAGE }}
while read pod; do cluster_name: ${{ env.KIND_CLUSTER_NAME }}
kubectl logs -n kruise-system $pod config: ./test/kind-conf.yaml
done < <(kubectl get pods -n kruise-system -l control-plane=controller-manager --no-headers | awk '{print $1}') version: ${{ env.KIND_VERSION }}
echo "test fail, dump kruise-daemon logs" - name: Install-CSI
while read pod; do run: |
kubectl logs -n kruise-system $pod make install-csi
done < <(kubectl get pods -n kruise-system -l control-plane=daemon --no-headers | awk '{print $1}')
fi
exit $retVal
pullimages-containerrecreate: - name: Build image
runs-on: ubuntu-20.04 run: |
export IMAGE="openkruise/kruise-manager:e2e-${GITHUB_RUN_ID}"
docker build --pull --no-cache . -t $IMAGE
kind load docker-image --name=${KIND_CLUSTER_NAME} $IMAGE || { echo >&2 "kind not installed or error loading image: $IMAGE"; exit 1; }
- name: Install Kruise
run: |
IMG=openkruise/kruise-manager:e2e-${GITHUB_RUN_ID} make install-kruise
- name: Run E2E Tests
run: |
export KUBECONFIG=/home/runner/.kube/config
tools/hack/run-kruise-e2e-test.sh --focus '(CloneSet|ContainerMeta)' --print-info
operation:
runs-on: ubuntu-24.04
steps: steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with: with:
submodules: true submodules: true
- name: Setup Go - name: Setup Go
uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0 uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
with: with:
go-version: ${{ env.GO_VERSION }} go-version: ${{ env.GO_VERSION }}
- name: Setup Kind Cluster - name: Setup Kind Cluster
@ -205,82 +139,20 @@ jobs:
kind load docker-image --name=${KIND_CLUSTER_NAME} $IMAGE || { echo >&2 "kind not installed or error loading image: $IMAGE"; exit 1; } kind load docker-image --name=${KIND_CLUSTER_NAME} $IMAGE || { echo >&2 "kind not installed or error loading image: $IMAGE"; exit 1; }
- name: Install Kruise - name: Install Kruise
run: | run: |
set -ex IMG=openkruise/kruise-manager:e2e-${GITHUB_RUN_ID} make install-kruise
kubectl cluster-info
IMG=openkruise/kruise-manager:e2e-${GITHUB_RUN_ID} ./scripts/deploy_kind.sh
NODES=$(kubectl get node | wc -l)
for ((i=1;i<10;i++));
do
set +e
PODS=$(kubectl get pod -n kruise-system | grep '1/1' | wc -l)
set -e
if [ "$PODS" -eq "$NODES" ]; then
break
fi
sleep 3
done
set +e
PODS=$(kubectl get pod -n kruise-system | grep '1/1' | wc -l)
kubectl get node -o yaml
kubectl get all -n kruise-system -o yaml
kubectl get pod -n kruise-system --no-headers | grep daemon | awk '{print $1}' | xargs kubectl logs -n kruise-system
kubectl get pod -n kruise-system --no-headers | grep daemon | awk '{print $1}' | xargs kubectl logs -n kruise-system --previous=true
set -e
if [ "$PODS" -eq "$NODES" ]; then
echo "Wait for kruise-manager and kruise-daemon ready successfully"
else
echo "Timeout to wait for kruise-manager and kruise-daemon ready"
exit 1
fi
- name: Run E2E Tests - name: Run E2E Tests
run: | run: |
export KUBECONFIG=/home/runner/.kube/config export KUBECONFIG=/home/runner/.kube/config
make ginkgo tools/hack/run-kruise-e2e-test.sh --focus '(PullImage|ContainerRecreateRequest|PullImages|ResourceDistribution|PersistentPodState|PodProbeMarker)' --print-info
set +e
./bin/ginkgo -timeout 60m -v --focus='\[apps\] (PullImage|ContainerRecreateRequest|PullImages)' test/e2e
retVal=$?
restartCount=$(kubectl get pod -n kruise-system -l control-plane=controller-manager --no-headers | awk '{print $4}')
if [ "${restartCount}" -eq "0" ];then
echo "Kruise-manager has not restarted"
else
kubectl get pod -n kruise-system -l control-plane=controller-manager --no-headers
echo "Kruise-manager has restarted, abort!!!"
kubectl get pod -n kruise-system --no-headers -l control-plane=controller-manager | awk '{print $1}' | xargs kubectl logs -p -n kruise-system
exit 1
fi
kubectl get pods -n kruise-system -l control-plane=daemon -o=jsonpath="{range .items[*]}{.metadata.namespace}{\"\t\"}{.metadata.name}{\"\n\"}{end}" | while read ns name;
do
restartCount=$(kubectl get pod -n ${ns} ${name} --no-headers | awk '{print $4}')
if [ "${restartCount}" -eq "0" ];then
echo "Kruise-daemon has not restarted"
else
kubectl get pods -n ${ns} -l control-plane=daemon --no-headers
echo "Kruise-daemon has restarted, abort!!!"
kubectl logs -p -n ${ns} ${name}
exit 1
fi
done
if [ "$retVal" -ne 0 ];then
echo "test fail, dump kruise-manager logs"
while read pod; do
kubectl logs -n kruise-system $pod
done < <(kubectl get pods -n kruise-system -l control-plane=controller-manager --no-headers | awk '{print $1}')
echo "test fail, dump kruise-daemon logs"
while read pod; do
kubectl logs -n kruise-system $pod
done < <(kubectl get pods -n kruise-system -l control-plane=daemon --no-headers | awk '{print $1}')
fi
exit $retVal
advanced-daemonset: advanced-daemonset:
runs-on: ubuntu-20.04 runs-on: ubuntu-24.04
steps: steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with: with:
submodules: true submodules: true
- name: Setup Go - name: Setup Go
uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0 uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
with: with:
go-version: ${{ env.GO_VERSION }} go-version: ${{ env.GO_VERSION }}
- name: Setup Kind Cluster - name: Setup Kind Cluster
@ -297,82 +169,20 @@ jobs:
kind load docker-image --name=${KIND_CLUSTER_NAME} $IMAGE || { echo >&2 "kind not installed or error loading image: $IMAGE"; exit 1; } kind load docker-image --name=${KIND_CLUSTER_NAME} $IMAGE || { echo >&2 "kind not installed or error loading image: $IMAGE"; exit 1; }
- name: Install Kruise - name: Install Kruise
run: | run: |
set -ex IMG=openkruise/kruise-manager:e2e-${GITHUB_RUN_ID} make install-kruise
kubectl cluster-info
IMG=openkruise/kruise-manager:e2e-${GITHUB_RUN_ID} ./scripts/deploy_kind.sh
NODES=$(kubectl get node | wc -l)
for ((i=1;i<10;i++));
do
set +e
PODS=$(kubectl get pod -n kruise-system | grep '1/1' | wc -l)
set -e
if [ "$PODS" -eq "$NODES" ]; then
break
fi
sleep 3
done
set +e
PODS=$(kubectl get pod -n kruise-system | grep '1/1' | wc -l)
kubectl get node -o yaml
kubectl get all -n kruise-system -o yaml
kubectl get pod -n kruise-system --no-headers | grep daemon | awk '{print $1}' | xargs kubectl logs -n kruise-system
kubectl get pod -n kruise-system --no-headers | grep daemon | awk '{print $1}' | xargs kubectl logs -n kruise-system --previous=true
set -e
if [ "$PODS" -eq "$NODES" ]; then
echo "Wait for kruise-manager and kruise-daemon ready successfully"
else
echo "Timeout to wait for kruise-manager and kruise-daemon ready"
exit 1
fi
- name: Run E2E Tests - name: Run E2E Tests
run: | run: |
export KUBECONFIG=/home/runner/.kube/config export KUBECONFIG=/home/runner/.kube/config
make ginkgo tools/hack/run-kruise-e2e-test.sh --focus 'DaemonSet' --print-info
set +e
./bin/ginkgo -timeout 60m -v --focus='\[apps\] DaemonSet' test/e2e
retVal=$?
restartCount=$(kubectl get pod -n kruise-system -l control-plane=controller-manager --no-headers | awk '{print $4}')
if [ "${restartCount}" -eq "0" ];then
echo "Kruise-manager has not restarted"
else
kubectl get pod -n kruise-system -l control-plane=controller-manager --no-headers
echo "Kruise-manager has restarted, abort!!!"
kubectl get pod -n kruise-system --no-headers -l control-plane=controller-manager | awk '{print $1}' | xargs kubectl logs -p -n kruise-system
exit 1
fi
kubectl get pods -n kruise-system -l control-plane=daemon -o=jsonpath="{range .items[*]}{.metadata.namespace}{\"\t\"}{.metadata.name}{\"\n\"}{end}" | while read ns name;
do
restartCount=$(kubectl get pod -n ${ns} ${name} --no-headers | awk '{print $4}')
if [ "${restartCount}" -eq "0" ];then
echo "Kruise-daemon has not restarted"
else
kubectl get pods -n ${ns} -l control-plane=daemon --no-headers
echo "Kruise-daemon has restarted, abort!!!"
kubectl logs -p -n ${ns} ${name}
exit 1
fi
done
if [ "$retVal" -ne 0 ];then
echo "test fail, dump kruise-manager logs"
while read pod; do
kubectl logs -n kruise-system $pod
done < <(kubectl get pods -n kruise-system -l control-plane=controller-manager --no-headers | awk '{print $1}')
echo "test fail, dump kruise-daemon logs"
while read pod; do
kubectl logs -n kruise-system $pod
done < <(kubectl get pods -n kruise-system -l control-plane=daemon --no-headers | awk '{print $1}')
fi
exit $retVal
sidecarset: sidecar:
runs-on: ubuntu-20.04 runs-on: ubuntu-24.04
steps: steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with: with:
submodules: true submodules: true
- name: Setup Go - name: Setup Go
uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0 uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
with: with:
go-version: ${{ env.GO_VERSION }} go-version: ${{ env.GO_VERSION }}
- name: Setup Kind Cluster - name: Setup Kind Cluster
@ -389,82 +199,20 @@ jobs:
kind load docker-image --name=${KIND_CLUSTER_NAME} $IMAGE || { echo >&2 "kind not installed or error loading image: $IMAGE"; exit 1; } kind load docker-image --name=${KIND_CLUSTER_NAME} $IMAGE || { echo >&2 "kind not installed or error loading image: $IMAGE"; exit 1; }
- name: Install Kruise - name: Install Kruise
run: | run: |
set -ex IMG=openkruise/kruise-manager:e2e-${GITHUB_RUN_ID} make install-kruise
kubectl cluster-info
IMG=openkruise/kruise-manager:e2e-${GITHUB_RUN_ID} ./scripts/deploy_kind.sh
NODES=$(kubectl get node | wc -l)
for ((i=1;i<10;i++));
do
set +e
PODS=$(kubectl get pod -n kruise-system | grep '1/1' | wc -l)
set -e
if [ "$PODS" -eq "$NODES" ]; then
break
fi
sleep 3
done
set +e
PODS=$(kubectl get pod -n kruise-system | grep '1/1' | wc -l)
kubectl get node -o yaml
kubectl get all -n kruise-system -o yaml
kubectl get pod -n kruise-system --no-headers | grep daemon | awk '{print $1}' | xargs kubectl logs -n kruise-system
kubectl get pod -n kruise-system --no-headers | grep daemon | awk '{print $1}' | xargs kubectl logs -n kruise-system --previous=true
set -e
if [ "$PODS" -eq "$NODES" ]; then
echo "Wait for kruise-manager and kruise-daemon ready successfully"
else
echo "Timeout to wait for kruise-manager and kruise-daemon ready"
exit 1
fi
- name: Run E2E Tests - name: Run E2E Tests
run: | run: |
export KUBECONFIG=/home/runner/.kube/config export KUBECONFIG=/home/runner/.kube/config
make ginkgo tools/hack/run-kruise-e2e-test.sh --focus 'SidecarSet|SidecarTerminator|ContainerPriority' --print-info
set +e
./bin/ginkgo -timeout 60m -v --focus='\[apps\] SidecarSet' test/e2e
retVal=$?
restartCount=$(kubectl get pod -n kruise-system -l control-plane=controller-manager --no-headers | awk '{print $4}')
if [ "${restartCount}" -eq "0" ];then
echo "Kruise-manager has not restarted"
else
kubectl get pod -n kruise-system -l control-plane=controller-manager --no-headers
echo "Kruise-manager has restarted, abort!!!"
kubectl get pod -n kruise-system --no-headers -l control-plane=controller-manager | awk '{print $1}' | xargs kubectl logs -p -n kruise-system
exit 1
fi
kubectl get pods -n kruise-system -l control-plane=daemon -o=jsonpath="{range .items[*]}{.metadata.namespace}{\"\t\"}{.metadata.name}{\"\n\"}{end}" | while read ns name;
do
restartCount=$(kubectl get pod -n ${ns} ${name} --no-headers | awk '{print $4}')
if [ "${restartCount}" -eq "0" ];then
echo "Kruise-daemon has not restarted"
else
kubectl get pods -n ${ns} -l control-plane=daemon --no-headers
echo "Kruise-daemon has restarted, abort!!!"
kubectl logs -p -n ${ns} ${name}
exit 1
fi
done
if [ "$retVal" -ne 0 ];then
echo "test fail, dump kruise-manager logs"
while read pod; do
kubectl logs -n kruise-system $pod
done < <(kubectl get pods -n kruise-system -l control-plane=controller-manager --no-headers | awk '{print $1}')
echo "test fail, dump kruise-daemon logs"
while read pod; do
kubectl logs -n kruise-system $pod
done < <(kubectl get pods -n kruise-system -l control-plane=daemon --no-headers | awk '{print $1}')
fi
exit $retVal
ephemeraljob: job-workload:
runs-on: ubuntu-20.04 runs-on: ubuntu-24.04
steps: steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with: with:
submodules: true submodules: true
- name: Setup Go - name: Setup Go
uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0 uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
with: with:
go-version: ${{ env.GO_VERSION }} go-version: ${{ env.GO_VERSION }}
- name: Setup Kind Cluster - name: Setup Kind Cluster
@ -481,60 +229,20 @@ jobs:
kind load docker-image --name=${KIND_CLUSTER_NAME} $IMAGE || { echo >&2 "kind not installed or error loading image: $IMAGE"; exit 1; } kind load docker-image --name=${KIND_CLUSTER_NAME} $IMAGE || { echo >&2 "kind not installed or error loading image: $IMAGE"; exit 1; }
- name: Install Kruise - name: Install Kruise
run: | run: |
set -ex IMG=openkruise/kruise-manager:e2e-${GITHUB_RUN_ID} make install-kruise
kubectl cluster-info
IMG=openkruise/kruise-manager:e2e-${GITHUB_RUN_ID} ./scripts/deploy_kind.sh
NODES=$(kubectl get node | wc -l)
for ((i=1;i<10;i++));
do
set +e
PODS=$(kubectl get pod -n kruise-system | grep '1/1' | wc -l)
set -e
if [ "$PODS" -eq "$NODES" ]; then
break
fi
sleep 3
done
set +e
PODS=$(kubectl get pod -n kruise-system | grep '1/1' | wc -l)
kubectl get node -o yaml
kubectl get all -n kruise-system -o yaml
kubectl get pod -n kruise-system --no-headers | grep daemon | awk '{print $1}' | xargs kubectl logs -n kruise-system
kubectl get pod -n kruise-system --no-headers | grep daemon | awk '{print $1}' | xargs kubectl logs -n kruise-system --previous=true
set -e
if [ "$PODS" -eq "$NODES" ]; then
echo "Wait for kruise-manager and kruise-daemon ready successfully"
else
echo "Timeout to wait for kruise-manager and kruise-daemon ready"
exit 1
fi
- name: Run E2E Tests - name: Run E2E Tests
run: | run: |
export KUBECONFIG=/home/runner/.kube/config export KUBECONFIG=/home/runner/.kube/config
make ginkgo tools/hack/run-kruise-e2e-test.sh --focus '(EphemeralJob|BroadcastJob)' --print-info
set +e
./bin/ginkgo -timeout 60m -v --focus='\[apps\] EphemeralJob' test/e2e
retVal=$?
if [ "$retVal" -ne 0 ];then
echo "test fail, dump kruise-manager logs"
while read pod; do
kubectl logs -n kruise-system $pod
done < <(kubectl get pods -n kruise-system -l control-plane=controller-manager --no-headers | awk '{print $1}')
echo "test fail, dump kruise-daemon logs"
while read pod; do
kubectl logs -n kruise-system $pod
done < <(kubectl get pods -n kruise-system -l control-plane=daemon --no-headers | awk '{print $1}')
fi
exit $retVal
podUnavailableBudget: policy:
runs-on: ubuntu-20.04 runs-on: ubuntu-24.04
steps: steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with: with:
submodules: true submodules: true
- name: Setup Go - name: Setup Go
uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0 uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
with: with:
go-version: ${{ env.GO_VERSION }} go-version: ${{ env.GO_VERSION }}
- name: Setup Kind Cluster - name: Setup Kind Cluster
@ -551,55 +259,19 @@ jobs:
kind load docker-image --name=${KIND_CLUSTER_NAME} $IMAGE || { echo >&2 "kind not installed or error loading image: $IMAGE"; exit 1; } kind load docker-image --name=${KIND_CLUSTER_NAME} $IMAGE || { echo >&2 "kind not installed or error loading image: $IMAGE"; exit 1; }
- name: Install Kruise - name: Install Kruise
run: | run: |
set -ex IMG=openkruise/kruise-manager:e2e-${GITHUB_RUN_ID} make install-kruise
kubectl cluster-info
IMG=openkruise/kruise-manager:e2e-${GITHUB_RUN_ID} ./scripts/deploy_kind.sh
NODES=$(kubectl get node | wc -l)
for ((i=1;i<10;i++));
do
set +e
PODS=$(kubectl get pod -n kruise-system | grep '1/1' | wc -l)
set -e
if [ "$PODS" -eq "$NODES" ]; then
break
fi
sleep 3
done
set +e
PODS=$(kubectl get pod -n kruise-system | grep '1/1' | wc -l)
kubectl get node -o yaml
kubectl get all -n kruise-system -o yaml
kubectl get pod -n kruise-system --no-headers | grep daemon | awk '{print $1}' | xargs kubectl logs -n kruise-system
kubectl get pod -n kruise-system --no-headers | grep daemon | awk '{print $1}' | xargs kubectl logs -n kruise-system --previous=true
set -e
if [ "$PODS" -eq "$NODES" ]; then
echo "Wait for kruise-manager and kruise-daemon ready successfully"
else
echo "Timeout to wait for kruise-manager and kruise-daemon ready"
exit 1
fi
- name: Run E2E Tests - name: Run E2E Tests
run: | run: |
export KUBECONFIG=/home/runner/.kube/config export KUBECONFIG=/home/runner/.kube/config
make ginkgo tools/hack/run-kruise-e2e-test.sh --focus '(PodUnavailableBudget|DeletionProtection)' --print-info
set +e multidomain:
./bin/ginkgo -timeout 60m -v --focus='\[policy\] PodUnavailableBudget' test/e2e runs-on: ubuntu-24.04
retVal=$?
if [ "$retVal" -ne 0 ];then
echo "test fail, dump kruise-manager logs"
while read pod; do
kubectl logs -n kruise-system $pod
done < <(kubectl get pods -n kruise-system -l control-plane=controller-manager --no-headers | awk '{print $1}')
fi
exit $retVal
other:
runs-on: ubuntu-20.04
steps: steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with: with:
submodules: true submodules: true
- name: Setup Go - name: Setup Go
uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0 uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
with: with:
go-version: ${{ env.GO_VERSION }} go-version: ${{ env.GO_VERSION }}
- name: Setup Kind Cluster - name: Setup Kind Cluster
@ -616,73 +288,8 @@ jobs:
kind load docker-image --name=${KIND_CLUSTER_NAME} $IMAGE || { echo >&2 "kind not installed or error loading image: $IMAGE"; exit 1; } kind load docker-image --name=${KIND_CLUSTER_NAME} $IMAGE || { echo >&2 "kind not installed or error loading image: $IMAGE"; exit 1; }
- name: Install Kruise - name: Install Kruise
run: | run: |
set -ex ENABLE_E2E_CONFIG=true IMG=openkruise/kruise-manager:e2e-${GITHUB_RUN_ID} make install-kruise
kubectl create ns kruise-system
kubectl apply -f test/kruise-e2e-config.yaml
kubectl cluster-info
IMG=openkruise/kruise-manager:e2e-${GITHUB_RUN_ID} ./scripts/deploy_kind.sh
NODES=$(kubectl get node | wc -l)
for ((i=1;i<10;i++));
do
set +e
PODS=$(kubectl get pod -n kruise-system | grep '1/1' | wc -l)
set -e
if [ "$PODS" -eq "$NODES" ]; then
break
fi
sleep 3
done
set +e
PODS=$(kubectl get pod -n kruise-system | grep '1/1' | wc -l)
kubectl get node -o yaml
kubectl get all -n kruise-system -o yaml
kubectl get pod -n kruise-system --no-headers | grep daemon | awk '{print $1}' | xargs kubectl logs -n kruise-system
kubectl get pod -n kruise-system --no-headers | grep daemon | awk '{print $1}' | xargs kubectl logs -n kruise-system --previous=true
set -e
if [ "$PODS" -eq "$NODES" ]; then
echo "Wait for kruise-manager and kruise-daemon ready successfully"
else
echo "Timeout to wait for kruise-manager and kruise-daemon ready"
exit 1
fi
- name: Run E2E Tests - name: Run E2E Tests
run: | run: |
export KUBECONFIG=/home/runner/.kube/config export KUBECONFIG=/home/runner/.kube/config
make ginkgo tools/hack/run-kruise-e2e-test.sh --focus '(UnitedDeployment|WorkloadSpread)' --print-info
set +e
kubectl apply -f https://raw.githubusercontent.com/kubeflow/training-operator/refs/heads/v1.8-branch/manifests/base/crds/kubeflow.org_tfjobs.yaml
./bin/ginkgo -timeout 90m -v --skip='\[apps\] (AppStatefulSetStorage|StatefulSet|PullImage|PullImages|ContainerRecreateRequest|DaemonSet|SidecarSet|EphemeralJob)' --skip='\[policy\] PodUnavailableBudget' test/e2e
retVal=$?
restartCount=$(kubectl get pod -n kruise-system -l control-plane=controller-manager --no-headers | awk '{print $4}')
if [ "${restartCount}" -eq "0" ];then
echo "Kruise-manager has not restarted"
else
kubectl get pod -n kruise-system -l control-plane=controller-manager --no-headers
echo "Kruise-manager has restarted, abort!!!"
kubectl get pod -n kruise-system --no-headers -l control-plane=controller-manager | awk '{print $1}' | xargs kubectl logs -p -n kruise-system
exit 1
fi
kubectl get pods -n kruise-system -l control-plane=daemon -o=jsonpath="{range .items[*]}{.metadata.namespace}{\"\t\"}{.metadata.name}{\"\n\"}{end}" | while read ns name;
do
restartCount=$(kubectl get pod -n ${ns} ${name} --no-headers | awk '{print $4}')
if [ "${restartCount}" -eq "0" ];then
echo "Kruise-daemon has not restarted"
else
kubectl get pods -n ${ns} -l control-plane=daemon --no-headers
echo "Kruise-daemon has restarted, abort!!!"
kubectl logs -p -n ${ns} ${name}
exit 1
fi
done
if [ "${retVal}" -ne 0 ];then
echo "test fail, dump kruise-manager logs"
while read pod; do
kubectl logs -n kruise-system $pod
done < <(kubectl get pods -n kruise-system -l control-plane=controller-manager --no-headers | awk '{print $1}')
echo "test fail, dump kruise-daemon logs"
while read pod; do
kubectl logs -n kruise-system $pod
done < <(kubectl get pods -n kruise-system -l control-plane=daemon --no-headers | awk '{print $1}')
fi
exit $retVal

View File

@ -13,20 +13,20 @@ permissions: read-all
env: env:
# Common versions # Common versions
GO_VERSION: '1.22' GO_VERSION: '1.23'
KIND_VERSION: 'v0.22.0' KIND_VERSION: 'v0.22.0'
KIND_IMAGE: 'kindest/node:v1.28.7' KIND_IMAGE: 'kindest/node:v1.28.7'
KIND_CLUSTER_NAME: 'ci-testing' KIND_CLUSTER_NAME: 'ci-testing'
jobs: jobs:
astatefulset-storage: astatefulset-storage:
runs-on: ubuntu-20.04 runs-on: ubuntu-24.04
steps: steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with: with:
submodules: true submodules: true
- name: Setup Go - name: Setup Go
uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0 uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
with: with:
go-version: ${{ env.GO_VERSION }} go-version: ${{ env.GO_VERSION }}
- name: Setup Kind Cluster - name: Setup Kind Cluster
@ -51,39 +51,16 @@ jobs:
- name: Run E2E Tests - name: Run E2E Tests
run: | run: |
export KUBECONFIG=/home/runner/.kube/config export KUBECONFIG=/home/runner/.kube/config
make ginkgo tools/hack/run-kruise-e2e-test.sh --focus 'VolumeExpansion' --print-info
set +e
./bin/ginkgo -timeout 60m -p -v --focus='\[apps\] AppStatefulSetStorage' test/e2e
retVal=$?
restartCount=$(kubectl get pod -n kruise-system -l control-plane=controller-manager --no-headers | awk '{print $4}')
if [ "${restartCount}" -eq "0" ];then
echo "Kruise-manager has not restarted"
else
kubectl get pod -n kruise-system -l control-plane=controller-manager --no-headers
echo "Kruise-manager has restarted, abort!!!"
kubectl get pod -n kruise-system --no-headers -l control-plane=controller-manager | awk '{print $1}' | xargs kubectl logs -p -n kruise-system
exit 1
fi
if [ "$retVal" -ne 0 ];then
echo "test fail, dump kruise-manager logs"
while read pod; do
kubectl logs -n kruise-system $pod
done < <(kubectl get pods -n kruise-system -l control-plane=controller-manager --no-headers | awk '{print $1}')
echo "test fail, dump kruise-daemon logs"
while read pod; do
kubectl logs -n kruise-system $pod
done < <(kubectl get pods -n kruise-system -l control-plane=daemon --no-headers | awk '{print $1}')
fi
exit $retVal
astatefulset: astatefulset:
runs-on: ubuntu-20.04 runs-on: ubuntu-24.04
steps: steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with: with:
submodules: true submodules: true
- name: Setup Go - name: Setup Go
uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0 uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
with: with:
go-version: ${{ env.GO_VERSION }} go-version: ${{ env.GO_VERSION }}
- name: Setup Kind Cluster - name: Setup Kind Cluster
@ -104,39 +81,16 @@ jobs:
- name: Run E2E Tests - name: Run E2E Tests
run: | run: |
export KUBECONFIG=/home/runner/.kube/config export KUBECONFIG=/home/runner/.kube/config
make ginkgo tools/hack/run-kruise-e2e-test.sh --focus 'StatefulSet' --print-info
set +e
./bin/ginkgo -timeout 60m -v --focus='\[apps\] StatefulSet' test/e2e
retVal=$?
restartCount=$(kubectl get pod -n kruise-system -l control-plane=controller-manager --no-headers | awk '{print $4}')
if [ "${restartCount}" -eq "0" ];then
echo "Kruise-manager has not restarted"
else
kubectl get pod -n kruise-system -l control-plane=controller-manager --no-headers
echo "Kruise-manager has restarted, abort!!!"
kubectl get pod -n kruise-system --no-headers -l control-plane=controller-manager | awk '{print $1}' | xargs kubectl logs -p -n kruise-system
exit 1
fi
if [ "$retVal" -ne 0 ];then
echo "test fail, dump kruise-manager logs"
while read pod; do
kubectl logs -n kruise-system $pod
done < <(kubectl get pods -n kruise-system -l control-plane=controller-manager --no-headers | awk '{print $1}')
echo "test fail, dump kruise-daemon logs"
while read pod; do
kubectl logs -n kruise-system $pod
done < <(kubectl get pods -n kruise-system -l control-plane=daemon --no-headers | awk '{print $1}')
fi
exit $retVal
pullimages-containerrecreate: operation:
runs-on: ubuntu-20.04 runs-on: ubuntu-24.04
steps: steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with: with:
submodules: true submodules: true
- name: Setup Go - name: Setup Go
uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0 uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
with: with:
go-version: ${{ env.GO_VERSION }} go-version: ${{ env.GO_VERSION }}
- name: Setup Kind Cluster - name: Setup Kind Cluster
@ -157,52 +111,16 @@ jobs:
- name: Run E2E Tests - name: Run E2E Tests
run: | run: |
export KUBECONFIG=/home/runner/.kube/config export KUBECONFIG=/home/runner/.kube/config
make ginkgo tools/hack/run-kruise-e2e-test.sh --focus '(PullImage|ContainerRecreateRequest|PullImages|ResourceDistribution|PersistentPodState|PodProbeMarker)' --print-info
set +e
./bin/ginkgo -timeout 60m -v --focus='\[apps\] (PullImage|ContainerRecreateRequest|PullImages)' test/e2e
retVal=$?
restartCount=$(kubectl get pod -n kruise-system -l control-plane=controller-manager --no-headers | awk '{print $4}')
if [ "${restartCount}" -eq "0" ];then
echo "Kruise-manager has not restarted"
else
kubectl get pod -n kruise-system -l control-plane=controller-manager --no-headers
echo "Kruise-manager has restarted, abort!!!"
kubectl get pod -n kruise-system --no-headers -l control-plane=controller-manager | awk '{print $1}' | xargs kubectl logs -p -n kruise-system
exit 1
fi
kubectl get pods -n kruise-system -l control-plane=daemon -o=jsonpath="{range .items[*]}{.metadata.namespace}{\"\t\"}{.metadata.name}{\"\n\"}{end}" | while read ns name;
do
restartCount=$(kubectl get pod -n ${ns} ${name} --no-headers | awk '{print $4}')
if [ "${restartCount}" -eq "0" ];then
echo "Kruise-daemon has not restarted"
else
kubectl get pods -n ${ns} -l control-plane=daemon --no-headers
echo "Kruise-daemon has restarted, abort!!!"
kubectl logs -p -n ${ns} ${name}
exit 1
fi
done
if [ "$retVal" -ne 0 ];then
echo "test fail, dump kruise-manager logs"
while read pod; do
kubectl logs -n kruise-system $pod
done < <(kubectl get pods -n kruise-system -l control-plane=controller-manager --no-headers | awk '{print $1}')
echo "test fail, dump kruise-daemon logs"
while read pod; do
kubectl logs -n kruise-system $pod
done < <(kubectl get pods -n kruise-system -l control-plane=daemon --no-headers | awk '{print $1}')
fi
exit $retVal
advanced-daemonset: advanced-daemonset:
runs-on: ubuntu-20.04 runs-on: ubuntu-24.04
steps: steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with: with:
submodules: true submodules: true
- name: Setup Go - name: Setup Go
uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0 uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
with: with:
go-version: ${{ env.GO_VERSION }} go-version: ${{ env.GO_VERSION }}
- name: Setup Kind Cluster - name: Setup Kind Cluster
@ -223,52 +141,16 @@ jobs:
- name: Run E2E Tests - name: Run E2E Tests
run: | run: |
export KUBECONFIG=/home/runner/.kube/config export KUBECONFIG=/home/runner/.kube/config
make ginkgo tools/hack/run-kruise-e2e-test.sh --focus 'DaemonSet' --print-info
set +e
./bin/ginkgo -timeout 60m -v --focus='\[apps\] DaemonSet' test/e2e
retVal=$?
restartCount=$(kubectl get pod -n kruise-system -l control-plane=controller-manager --no-headers | awk '{print $4}')
if [ "${restartCount}" -eq "0" ];then
echo "Kruise-manager has not restarted"
else
kubectl get pod -n kruise-system -l control-plane=controller-manager --no-headers
echo "Kruise-manager has restarted, abort!!!"
kubectl get pod -n kruise-system --no-headers -l control-plane=controller-manager | awk '{print $1}' | xargs kubectl logs -p -n kruise-system
exit 1
fi
kubectl get pods -n kruise-system -l control-plane=daemon -o=jsonpath="{range .items[*]}{.metadata.namespace}{\"\t\"}{.metadata.name}{\"\n\"}{end}" | while read ns name;
do
restartCount=$(kubectl get pod -n ${ns} ${name} --no-headers | awk '{print $4}')
if [ "${restartCount}" -eq "0" ];then
echo "Kruise-daemon has not restarted"
else
kubectl get pods -n ${ns} -l control-plane=daemon --no-headers
echo "Kruise-daemon has restarted, abort!!!"
kubectl logs -p -n ${ns} ${name}
exit 1
fi
done
if [ "$retVal" -ne 0 ];then
echo "test fail, dump kruise-manager logs"
while read pod; do
kubectl logs -n kruise-system $pod
done < <(kubectl get pods -n kruise-system -l control-plane=controller-manager --no-headers | awk '{print $1}')
echo "test fail, dump kruise-daemon logs"
while read pod; do
kubectl logs -n kruise-system $pod
done < <(kubectl get pods -n kruise-system -l control-plane=daemon --no-headers | awk '{print $1}')
fi
exit $retVal
sidecarset: sidecar:
runs-on: ubuntu-20.04 runs-on: ubuntu-24.04
steps: steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with: with:
submodules: true submodules: true
- name: Setup Go - name: Setup Go
uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0 uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
with: with:
go-version: ${{ env.GO_VERSION }} go-version: ${{ env.GO_VERSION }}
- name: Setup Kind Cluster - name: Setup Kind Cluster
@ -285,56 +167,20 @@ jobs:
kind load docker-image --name=${KIND_CLUSTER_NAME} $IMAGE || { echo >&2 "kind not installed or error loading image: $IMAGE"; exit 1; } kind load docker-image --name=${KIND_CLUSTER_NAME} $IMAGE || { echo >&2 "kind not installed or error loading image: $IMAGE"; exit 1; }
- name: Install Kruise - name: Install Kruise
run: | run: |
DISABLE_E2E_CONFIG=true IMG=openkruise/kruise-manager:e2e-${GITHUB_RUN_ID} make install-kruise IMG=openkruise/kruise-manager:e2e-${GITHUB_RUN_ID} make install-kruise
- name: Run E2E Tests - name: Run E2E Tests
run: | run: |
export KUBECONFIG=/home/runner/.kube/config export KUBECONFIG=/home/runner/.kube/config
make ginkgo tools/hack/run-kruise-e2e-test.sh --focus 'SidecarSet|SidecarTerminator|ContainerPriority' --print-info
set +e
./bin/ginkgo -timeout 60m -v --focus='\[apps\] SidecarSet' test/e2e
retVal=$?
restartCount=$(kubectl get pod -n kruise-system -l control-plane=controller-manager --no-headers | awk '{print $4}')
if [ "${restartCount}" -eq "0" ];then
echo "Kruise-manager has not restarted"
else
kubectl get pod -n kruise-system -l control-plane=controller-manager --no-headers
echo "Kruise-manager has restarted, abort!!!"
kubectl get pod -n kruise-system --no-headers -l control-plane=controller-manager | awk '{print $1}' | xargs kubectl logs -p -n kruise-system
exit 1
fi
kubectl get pods -n kruise-system -l control-plane=daemon -o=jsonpath="{range .items[*]}{.metadata.namespace}{\"\t\"}{.metadata.name}{\"\n\"}{end}" | while read ns name;
do
restartCount=$(kubectl get pod -n ${ns} ${name} --no-headers | awk '{print $4}')
if [ "${restartCount}" -eq "0" ];then
echo "Kruise-daemon has not restarted"
else
kubectl get pods -n ${ns} -l control-plane=daemon --no-headers
echo "Kruise-daemon has restarted, abort!!!"
kubectl logs -p -n ${ns} ${name}
exit 1
fi
done
if [ "$retVal" -ne 0 ];then
echo "test fail, dump kruise-manager logs"
while read pod; do
kubectl logs -n kruise-system $pod
done < <(kubectl get pods -n kruise-system -l control-plane=controller-manager --no-headers | awk '{print $1}')
echo "test fail, dump kruise-daemon logs"
while read pod; do
kubectl logs -n kruise-system $pod
done < <(kubectl get pods -n kruise-system -l control-plane=daemon --no-headers | awk '{print $1}')
fi
exit $retVal
ephemeraljob: job-workload:
runs-on: ubuntu-20.04 runs-on: ubuntu-24.04
steps: steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with: with:
submodules: true submodules: true
- name: Setup Go - name: Setup Go
uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0 uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
with: with:
go-version: ${{ env.GO_VERSION }} go-version: ${{ env.GO_VERSION }}
- name: Setup Kind Cluster - name: Setup Kind Cluster
@ -355,30 +201,16 @@ jobs:
- name: Run E2E Tests - name: Run E2E Tests
run: | run: |
export KUBECONFIG=/home/runner/.kube/config export KUBECONFIG=/home/runner/.kube/config
make ginkgo tools/hack/run-kruise-e2e-test.sh --focus '(EphemeralJob|BroadcastJob)' --print-info
set +e
./bin/ginkgo -timeout 60m -v --focus='\[apps\] EphemeralJob' test/e2e
retVal=$?
if [ "$retVal" -ne 0 ];then
echo "test fail, dump kruise-manager logs"
while read pod; do
kubectl logs -n kruise-system $pod
done < <(kubectl get pods -n kruise-system -l control-plane=controller-manager --no-headers | awk '{print $1}')
echo "test fail, dump kruise-daemon logs"
while read pod; do
kubectl logs -n kruise-system $pod
done < <(kubectl get pods -n kruise-system -l control-plane=daemon --no-headers | awk '{print $1}')
fi
exit $retVal
podUnavailableBudget: policy:
runs-on: ubuntu-20.04 runs-on: ubuntu-24.04
steps: steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with: with:
submodules: true submodules: true
- name: Setup Go - name: Setup Go
uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0 uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
with: with:
go-version: ${{ env.GO_VERSION }} go-version: ${{ env.GO_VERSION }}
- name: Setup Kind Cluster - name: Setup Kind Cluster
@ -399,25 +231,16 @@ jobs:
- name: Run E2E Tests - name: Run E2E Tests
run: | run: |
export KUBECONFIG=/home/runner/.kube/config export KUBECONFIG=/home/runner/.kube/config
make ginkgo tools/hack/run-kruise-e2e-test.sh --focus '(PodUnavailableBudget|DeletionProtection)' --print-info
set +e
./bin/ginkgo -timeout 60m -v --focus='\[policy\] PodUnavailableBudget' test/e2e cloneset:
retVal=$? runs-on: ubuntu-24.04
if [ "$retVal" -ne 0 ];then
echo "test fail, dump kruise-manager logs"
while read pod; do
kubectl logs -n kruise-system $pod
done < <(kubectl get pods -n kruise-system -l control-plane=controller-manager --no-headers | awk '{print $1}')
fi
exit $retVal
clonesetAndInplace:
runs-on: ubuntu-20.04
steps: steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with: with:
submodules: true submodules: true
- name: Setup Go - name: Setup Go
uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0 uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
with: with:
go-version: ${{ env.GO_VERSION }} go-version: ${{ env.GO_VERSION }}
- name: Setup Kind Cluster - name: Setup Kind Cluster
@ -438,43 +261,20 @@ jobs:
kind load docker-image --name=${KIND_CLUSTER_NAME} $IMAGE || { echo >&2 "kind not installed or error loading image: $IMAGE"; exit 1; } kind load docker-image --name=${KIND_CLUSTER_NAME} $IMAGE || { echo >&2 "kind not installed or error loading image: $IMAGE"; exit 1; }
- name: Install Kruise - name: Install Kruise
run: | run: |
IMG=openkruise/kruise-manager:e2e-${GITHUB_RUN_ID} make install-kruise ENABLE_E2E_CONFIG=true IMG=openkruise/kruise-manager:e2e-${GITHUB_RUN_ID} make install-kruise
- name: Run E2E Tests - name: Run E2E Tests
run: | run: |
export KUBECONFIG=/home/runner/.kube/config export KUBECONFIG=/home/runner/.kube/config
make ginkgo tools/hack/run-kruise-e2e-test.sh --focus '(CloneSet|ContainerMeta|InplaceVPA)' --print-info
set +e
./bin/ginkgo -p -timeout 120m -v --focus='\[apps\] (InplaceVPA)' test/e2e
retVal=$?
restartCount=$(kubectl get pod -n kruise-system -l control-plane=controller-manager --no-headers | awk '{print $4}')
if [ "${restartCount}" -eq "0" ];then
echo "Kruise-manager has not restarted"
else
kubectl get pod -n kruise-system -l control-plane=controller-manager --no-headers
echo "Kruise-manager has restarted, abort!!!"
kubectl get pod -n kruise-system --no-headers -l control-plane=controller-manager | awk '{print $1}' | xargs kubectl logs -p -n kruise-system
exit 1
fi
if [ "$retVal" -ne 0 ];then
echo "test fail, dump kruise-manager logs"
while read pod; do
kubectl logs -n kruise-system $pod
done < <(kubectl get pods -n kruise-system -l control-plane=controller-manager --no-headers | awk '{print $1}')
echo "test fail, dump kruise-daemon logs"
while read pod; do
kubectl logs -n kruise-system $pod
done < <(kubectl get pods -n kruise-system -l control-plane=daemon --no-headers | awk '{print $1}')
fi
exit $retVal
other: multidomain:
runs-on: ubuntu-20.04 runs-on: ubuntu-24.04
steps: steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with: with:
submodules: true submodules: true
- name: Setup Go - name: Setup Go
uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0 uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
with: with:
go-version: ${{ env.GO_VERSION }} go-version: ${{ env.GO_VERSION }}
- name: Setup Kind Cluster - name: Setup Kind Cluster
@ -491,45 +291,8 @@ jobs:
kind load docker-image --name=${KIND_CLUSTER_NAME} $IMAGE || { echo >&2 "kind not installed or error loading image: $IMAGE"; exit 1; } kind load docker-image --name=${KIND_CLUSTER_NAME} $IMAGE || { echo >&2 "kind not installed or error loading image: $IMAGE"; exit 1; }
- name: Install Kruise - name: Install Kruise
run: | run: |
IMG=openkruise/kruise-manager:e2e-${GITHUB_RUN_ID} make install-kruise ENABLE_E2E_CONFIG=true IMG=openkruise/kruise-manager:e2e-${GITHUB_RUN_ID} make install-kruise
- name: Run E2E Tests - name: Run E2E Tests
run: | run: |
export KUBECONFIG=/home/runner/.kube/config export KUBECONFIG=/home/runner/.kube/config
make ginkgo tools/hack/run-kruise-e2e-test.sh --focus '(UnitedDeployment|WorkloadSpread)' --print-info
set +e
kubectl apply -f https://raw.githubusercontent.com/kubeflow/training-operator/refs/heads/v1.8-branch/manifests/base/crds/kubeflow.org_tfjobs.yaml
./bin/ginkgo -timeout 90m -v --skip='\[apps\] (InplaceVPA|AppStatefulSetStorage|StatefulSet|PullImage|PullImages|ContainerRecreateRequest|DaemonSet|SidecarSet|EphemeralJob)' --skip='\[policy\] PodUnavailableBudget' test/e2e
retVal=$?
restartCount=$(kubectl get pod -n kruise-system -l control-plane=controller-manager --no-headers | awk '{print $4}')
if [ "${restartCount}" -eq "0" ];then
echo "Kruise-manager has not restarted"
else
kubectl get pod -n kruise-system -l control-plane=controller-manager --no-headers
echo "Kruise-manager has restarted, abort!!!"
kubectl get pod -n kruise-system --no-headers -l control-plane=controller-manager | awk '{print $1}' | xargs kubectl logs -p -n kruise-system
exit 1
fi
kubectl get pods -n kruise-system -l control-plane=daemon -o=jsonpath="{range .items[*]}{.metadata.namespace}{\"\t\"}{.metadata.name}{\"\n\"}{end}" | while read ns name;
do
restartCount=$(kubectl get pod -n ${ns} ${name} --no-headers | awk '{print $4}')
if [ "${restartCount}" -eq "0" ];then
echo "Kruise-daemon has not restarted"
else
kubectl get pods -n ${ns} -l control-plane=daemon --no-headers
echo "Kruise-daemon has restarted, abort!!!"
kubectl logs -p -n ${ns} ${name}
exit 1
fi
done
if [ "${retVal}" -ne 0 ];then
echo "test fail, dump kruise-manager logs"
while read pod; do
kubectl logs -n kruise-system $pod
done < <(kubectl get pods -n kruise-system -l control-plane=controller-manager --no-headers | awk '{print $1}')
echo "test fail, dump kruise-daemon logs"
while read pod; do
kubectl logs -n kruise-system $pod
done < <(kubectl get pods -n kruise-system -l control-plane=daemon --no-headers | awk '{print $1}')
fi
exit $retVal

View File

@ -13,24 +13,24 @@ permissions: read-all
env: env:
# Common versions # Common versions
GO_VERSION: '1.22' GO_VERSION: '1.23'
KIND_VERSION: 'v0.22.0' KIND_VERSION: 'v0.22.0'
KIND_IMAGE: 'kindest/node:v1.30.8' KIND_IMAGE: 'kindest/node:v1.30.8'
KIND_CLUSTER_NAME: 'ci-testing' KIND_CLUSTER_NAME: 'ci-testing'
jobs: jobs:
astatefulset-storage: astatefulset-storage:
runs-on: ubuntu-20.04 runs-on: ubuntu-24.04
steps: steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with: with:
submodules: true submodules: true
- name: Setup Go - name: Setup Go
uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0 uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
with: with:
go-version: ${{ env.GO_VERSION }} go-version: ${{ env.GO_VERSION }}
- name: Setup Kind Cluster - name: Setup Kind Cluster
uses: helm/kind-action@0025e74a8c7512023d06dc019c617aa3cf561fde # v1.10.0 uses: helm/kind-action@a1b0e391336a6ee6713a0583f8c6240d70863de3 # v1.12.0
with: with:
node_image: ${{ env.KIND_IMAGE }} node_image: ${{ env.KIND_IMAGE }}
cluster_name: ${{ env.KIND_CLUSTER_NAME }} cluster_name: ${{ env.KIND_CLUSTER_NAME }}
@ -51,20 +51,20 @@ jobs:
- name: Run E2E Tests - name: Run E2E Tests
run: | run: |
export KUBECONFIG=/home/runner/.kube/config export KUBECONFIG=/home/runner/.kube/config
tools/hack/run-kruise-e2e-test.sh --focus '\[apps\] AppStatefulSetStorage' --print-info tools/hack/run-kruise-e2e-test.sh --focus 'VolumeExpansion' --print-info
astatefulset: astatefulset:
runs-on: ubuntu-20.04 runs-on: ubuntu-24.04
steps: steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with: with:
submodules: true submodules: true
- name: Setup Go - name: Setup Go
uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0 uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
with: with:
go-version: ${{ env.GO_VERSION }} go-version: ${{ env.GO_VERSION }}
- name: Setup Kind Cluster - name: Setup Kind Cluster
uses: helm/kind-action@0025e74a8c7512023d06dc019c617aa3cf561fde # v1.10.0 uses: helm/kind-action@a1b0e391336a6ee6713a0583f8c6240d70863de3 # v1.12.0
with: with:
node_image: ${{ env.KIND_IMAGE }} node_image: ${{ env.KIND_IMAGE }}
cluster_name: ${{ env.KIND_CLUSTER_NAME }} cluster_name: ${{ env.KIND_CLUSTER_NAME }}
@ -81,20 +81,20 @@ jobs:
- name: Run E2E Tests - name: Run E2E Tests
run: | run: |
export KUBECONFIG=/home/runner/.kube/config export KUBECONFIG=/home/runner/.kube/config
tools/hack/run-kruise-e2e-test.sh --focus '\[apps\] StatefulSet' --print-info tools/hack/run-kruise-e2e-test.sh --focus 'StatefulSet' --print-info
pullimages-containerrecreate: operation:
runs-on: ubuntu-20.04 runs-on: ubuntu-24.04
steps: steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with: with:
submodules: true submodules: true
- name: Setup Go - name: Setup Go
uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0 uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
with: with:
go-version: ${{ env.GO_VERSION }} go-version: ${{ env.GO_VERSION }}
- name: Setup Kind Cluster - name: Setup Kind Cluster
uses: helm/kind-action@0025e74a8c7512023d06dc019c617aa3cf561fde # v1.10.0 uses: helm/kind-action@a1b0e391336a6ee6713a0583f8c6240d70863de3 # v1.12.0
with: with:
node_image: ${{ env.KIND_IMAGE }} node_image: ${{ env.KIND_IMAGE }}
cluster_name: ${{ env.KIND_CLUSTER_NAME }} cluster_name: ${{ env.KIND_CLUSTER_NAME }}
@ -111,20 +111,20 @@ jobs:
- name: Run E2E Tests - name: Run E2E Tests
run: | run: |
export KUBECONFIG=/home/runner/.kube/config export KUBECONFIG=/home/runner/.kube/config
tools/hack/run-kruise-e2e-test.sh --focus '\[apps\] (PullImage|ContainerRecreateRequest|PullImages)' --print-info --disable-parallel tools/hack/run-kruise-e2e-test.sh --focus '(PullImage|ContainerRecreateRequest|PullImages|ResourceDistribution|PersistentPodState|PodProbeMarker)' --print-info
advanced-daemonset: advanced-daemonset:
runs-on: ubuntu-20.04 runs-on: ubuntu-24.04
steps: steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with: with:
submodules: true submodules: true
- name: Setup Go - name: Setup Go
uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0 uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
with: with:
go-version: ${{ env.GO_VERSION }} go-version: ${{ env.GO_VERSION }}
- name: Setup Kind Cluster - name: Setup Kind Cluster
uses: helm/kind-action@0025e74a8c7512023d06dc019c617aa3cf561fde # v1.10.0 uses: helm/kind-action@a1b0e391336a6ee6713a0583f8c6240d70863de3 # v1.12.0
with: with:
node_image: ${{ env.KIND_IMAGE }} node_image: ${{ env.KIND_IMAGE }}
cluster_name: ${{ env.KIND_CLUSTER_NAME }} cluster_name: ${{ env.KIND_CLUSTER_NAME }}
@ -141,50 +141,20 @@ jobs:
- name: Run E2E Tests - name: Run E2E Tests
run: | run: |
export KUBECONFIG=/home/runner/.kube/config export KUBECONFIG=/home/runner/.kube/config
tools/hack/run-kruise-e2e-test.sh --focus '\[apps\] DaemonSet' --print-info tools/hack/run-kruise-e2e-test.sh --focus 'DaemonSet' --print-info
sidecarset: sidecar:
runs-on: ubuntu-20.04 runs-on: ubuntu-24.04
steps: steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with: with:
submodules: true submodules: true
- name: Setup Go - name: Setup Go
uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0 uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
with: with:
go-version: ${{ env.GO_VERSION }} go-version: ${{ env.GO_VERSION }}
- name: Setup Kind Cluster - name: Setup Kind Cluster
uses: helm/kind-action@0025e74a8c7512023d06dc019c617aa3cf561fde # v1.10.0 uses: helm/kind-action@a1b0e391336a6ee6713a0583f8c6240d70863de3 # v1.12.0
with:
node_image: ${{ env.KIND_IMAGE }}
cluster_name: ${{ env.KIND_CLUSTER_NAME }}
config: ./test/kind-conf-with-vpa.yaml
version: ${{ env.KIND_VERSION }}
- name: Build image
run: |
export IMAGE="openkruise/kruise-manager:e2e-${GITHUB_RUN_ID}"
docker build --pull --no-cache . -t $IMAGE
kind load docker-image --name=${KIND_CLUSTER_NAME} $IMAGE || { echo >&2 "kind not installed or error loading image: $IMAGE"; exit 1; }
- name: Install Kruise
run: |
DISABLE_E2E_CONFIG=true IMG=openkruise/kruise-manager:e2e-${GITHUB_RUN_ID} make install-kruise
- name: Run E2E Tests
run: |
export KUBECONFIG=/home/runner/.kube/config
tools/hack/run-kruise-e2e-test.sh --focus '\[apps\] SidecarSet' --print-info
ephemeraljob:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
submodules: true
- name: Setup Go
uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0
with:
go-version: ${{ env.GO_VERSION }}
- name: Setup Kind Cluster
uses: helm/kind-action@0025e74a8c7512023d06dc019c617aa3cf561fde # v1.10.0
with: with:
node_image: ${{ env.KIND_IMAGE }} node_image: ${{ env.KIND_IMAGE }}
cluster_name: ${{ env.KIND_CLUSTER_NAME }} cluster_name: ${{ env.KIND_CLUSTER_NAME }}
@ -201,20 +171,20 @@ jobs:
- name: Run E2E Tests - name: Run E2E Tests
run: | run: |
export KUBECONFIG=/home/runner/.kube/config export KUBECONFIG=/home/runner/.kube/config
tools/hack/run-kruise-e2e-test.sh --focus '\[apps\] EphemeralJob' --print-info tools/hack/run-kruise-e2e-test.sh --focus 'SidecarSet|SidecarTerminator|ContainerPriority' --print-info
podUnavailableBudget: job-workload:
runs-on: ubuntu-20.04 runs-on: ubuntu-24.04
steps: steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with: with:
submodules: true submodules: true
- name: Setup Go - name: Setup Go
uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0 uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
with: with:
go-version: ${{ env.GO_VERSION }} go-version: ${{ env.GO_VERSION }}
- name: Setup Kind Cluster - name: Setup Kind Cluster
uses: helm/kind-action@0025e74a8c7512023d06dc019c617aa3cf561fde # v1.10.0 uses: helm/kind-action@a1b0e391336a6ee6713a0583f8c6240d70863de3 # v1.12.0
with: with:
node_image: ${{ env.KIND_IMAGE }} node_image: ${{ env.KIND_IMAGE }}
cluster_name: ${{ env.KIND_CLUSTER_NAME }} cluster_name: ${{ env.KIND_CLUSTER_NAME }}
@ -231,20 +201,50 @@ jobs:
- name: Run E2E Tests - name: Run E2E Tests
run: | run: |
export KUBECONFIG=/home/runner/.kube/config export KUBECONFIG=/home/runner/.kube/config
tools/hack/run-kruise-e2e-test.sh --focus '\[policy\] PodUnavailableBudget' --print-info tools/hack/run-kruise-e2e-test.sh --focus '(EphemeralJob|BroadcastJob)' --print-info
clonesetAndInplace: policy:
runs-on: ubuntu-20.04 runs-on: ubuntu-24.04
steps: steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with: with:
submodules: true submodules: true
- name: Setup Go - name: Setup Go
uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0 uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
with: with:
go-version: ${{ env.GO_VERSION }} go-version: ${{ env.GO_VERSION }}
- name: Setup Kind Cluster - name: Setup Kind Cluster
uses: helm/kind-action@0025e74a8c7512023d06dc019c617aa3cf561fde # v1.10.0 uses: helm/kind-action@a1b0e391336a6ee6713a0583f8c6240d70863de3 # v1.12.0
with:
node_image: ${{ env.KIND_IMAGE }}
cluster_name: ${{ env.KIND_CLUSTER_NAME }}
config: ./test/kind-conf-with-vpa.yaml
version: ${{ env.KIND_VERSION }}
- name: Build image
run: |
export IMAGE="openkruise/kruise-manager:e2e-${GITHUB_RUN_ID}"
docker build --pull --no-cache . -t $IMAGE
kind load docker-image --name=${KIND_CLUSTER_NAME} $IMAGE || { echo >&2 "kind not installed or error loading image: $IMAGE"; exit 1; }
- name: Install Kruise
run: |
IMG=openkruise/kruise-manager:e2e-${GITHUB_RUN_ID} make install-kruise
- name: Run E2E Tests
run: |
export KUBECONFIG=/home/runner/.kube/config
tools/hack/run-kruise-e2e-test.sh --focus '(PodUnavailableBudget|DeletionProtection)' --print-info
cloneset:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
submodules: true
- name: Setup Go
uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
with:
go-version: ${{ env.GO_VERSION }}
- name: Setup Kind Cluster
uses: helm/kind-action@a1b0e391336a6ee6713a0583f8c6240d70863de3 # v1.12.0
with: with:
node_image: ${{ env.KIND_IMAGE }} node_image: ${{ env.KIND_IMAGE }}
cluster_name: ${{ env.KIND_CLUSTER_NAME }} cluster_name: ${{ env.KIND_CLUSTER_NAME }}
@ -265,20 +265,20 @@ jobs:
- name: Run E2E Tests - name: Run E2E Tests
run: | run: |
export KUBECONFIG=/home/runner/.kube/config export KUBECONFIG=/home/runner/.kube/config
tools/hack/run-kruise-e2e-test.sh --focus '\[apps\] (CloneSet|InplaceVPA)' --print-info tools/hack/run-kruise-e2e-test.sh --focus '(CloneSet|ContainerMeta|InplaceVPA)' --print-info
other: multidomain:
runs-on: ubuntu-20.04 runs-on: ubuntu-24.04
steps: steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with: with:
submodules: true submodules: true
- name: Setup Go - name: Setup Go
uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0 uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
with: with:
go-version: ${{ env.GO_VERSION }} go-version: ${{ env.GO_VERSION }}
- name: Setup Kind Cluster - name: Setup Kind Cluster
uses: helm/kind-action@0025e74a8c7512023d06dc019c617aa3cf561fde # v1.10.0 uses: helm/kind-action@a1b0e391336a6ee6713a0583f8c6240d70863de3 # v1.12.0
with: with:
node_image: ${{ env.KIND_IMAGE }} node_image: ${{ env.KIND_IMAGE }}
cluster_name: ${{ env.KIND_CLUSTER_NAME }} cluster_name: ${{ env.KIND_CLUSTER_NAME }}
@ -291,8 +291,8 @@ jobs:
kind load docker-image --name=${KIND_CLUSTER_NAME} $IMAGE || { echo >&2 "kind not installed or error loading image: $IMAGE"; exit 1; } kind load docker-image --name=${KIND_CLUSTER_NAME} $IMAGE || { echo >&2 "kind not installed or error loading image: $IMAGE"; exit 1; }
- name: Install Kruise - name: Install Kruise
run: | run: |
IMG=openkruise/kruise-manager:e2e-${GITHUB_RUN_ID} make install-kruise ENABLE_E2E_CONFIG=true IMG=openkruise/kruise-manager:e2e-${GITHUB_RUN_ID} make install-kruise
- name: Run E2E Tests - name: Run E2E Tests
run: | run: |
export KUBECONFIG=/home/runner/.kube/config export KUBECONFIG=/home/runner/.kube/config
tools/hack/run-kruise-e2e-test.sh --focus "" --skip '\[apps\] (CloneSet|InplaceVPA|AppStatefulSetStorage|StatefulSet|PullImage|PullImages|ContainerRecreateRequest|DaemonSet|SidecarSet|EphemeralJob)' --skip '\[policy\] PodUnavailableBudget' --timeout 90m --print-info tools/hack/run-kruise-e2e-test.sh --focus '(UnitedDeployment|WorkloadSpread)' --print-info

298
.github/workflows/e2e-1.32.yaml vendored Normal file
View File

@ -0,0 +1,298 @@
name: E2E-1.32
on:
push:
branches:
- master
- release-*
pull_request: {}
workflow_dispatch: {}
# Declare default permissions as read only.
permissions: read-all
env:
# Common versions
GO_VERSION: '1.23'
KIND_VERSION: 'v0.22.0'
KIND_IMAGE: 'kindest/node:v1.32.0'
KIND_CLUSTER_NAME: 'ci-testing'
jobs:
astatefulset-storage:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
submodules: true
- name: Setup Go
uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
with:
go-version: ${{ env.GO_VERSION }}
- name: Setup Kind Cluster
uses: helm/kind-action@a1b0e391336a6ee6713a0583f8c6240d70863de3 # v1.12.0
with:
node_image: ${{ env.KIND_IMAGE }}
cluster_name: ${{ env.KIND_CLUSTER_NAME }}
config: ./test/kind-conf-with-vpa.yaml
version: ${{ env.KIND_VERSION }}
- name: Install-CSI
run: |
make install-csi
- name: Build image
run: |
export IMAGE="openkruise/kruise-manager:e2e-${GITHUB_RUN_ID}"
docker build --pull --no-cache . -t $IMAGE
kind load docker-image --name=${KIND_CLUSTER_NAME} $IMAGE || { echo >&2 "kind not installed or error loading image: $IMAGE"; exit 1; }
- name: Install Kruise
run: |
IMG=openkruise/kruise-manager:e2e-${GITHUB_RUN_ID} make install-kruise
- name: Run E2E Tests
run: |
export KUBECONFIG=/home/runner/.kube/config
tools/hack/run-kruise-e2e-test.sh --focus 'VolumeExpansion' --print-info
astatefulset:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
submodules: true
- name: Setup Go
uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
with:
go-version: ${{ env.GO_VERSION }}
- name: Setup Kind Cluster
uses: helm/kind-action@a1b0e391336a6ee6713a0583f8c6240d70863de3 # v1.12.0
with:
node_image: ${{ env.KIND_IMAGE }}
cluster_name: ${{ env.KIND_CLUSTER_NAME }}
config: ./test/kind-conf-with-vpa.yaml
version: ${{ env.KIND_VERSION }}
- name: Build image
run: |
export IMAGE="openkruise/kruise-manager:e2e-${GITHUB_RUN_ID}"
docker build --pull --no-cache . -t $IMAGE
kind load docker-image --name=${KIND_CLUSTER_NAME} $IMAGE || { echo >&2 "kind not installed or error loading image: $IMAGE"; exit 1; }
- name: Install Kruise
run: |
IMG=openkruise/kruise-manager:e2e-${GITHUB_RUN_ID} make install-kruise
- name: Run E2E Tests
run: |
export KUBECONFIG=/home/runner/.kube/config
tools/hack/run-kruise-e2e-test.sh --focus 'StatefulSet' --print-info
operation:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
submodules: true
- name: Setup Go
uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
with:
go-version: ${{ env.GO_VERSION }}
- name: Setup Kind Cluster
uses: helm/kind-action@a1b0e391336a6ee6713a0583f8c6240d70863de3 # v1.12.0
with:
node_image: ${{ env.KIND_IMAGE }}
cluster_name: ${{ env.KIND_CLUSTER_NAME }}
config: ./test/kind-conf-with-vpa.yaml
version: ${{ env.KIND_VERSION }}
- name: Build image
run: |
export IMAGE="openkruise/kruise-manager:e2e-${GITHUB_RUN_ID}"
docker build --pull --no-cache . -t $IMAGE
kind load docker-image --name=${KIND_CLUSTER_NAME} $IMAGE || { echo >&2 "kind not installed or error loading image: $IMAGE"; exit 1; }
- name: Install Kruise
run: |
IMG=openkruise/kruise-manager:e2e-${GITHUB_RUN_ID} make install-kruise
- name: Run E2E Tests
run: |
export KUBECONFIG=/home/runner/.kube/config
tools/hack/run-kruise-e2e-test.sh --focus '(PullImage|ContainerRecreateRequest|PullImages|ResourceDistribution|PersistentPodState|PodProbeMarker)' --print-info
advanced-daemonset:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
submodules: true
- name: Setup Go
uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
with:
go-version: ${{ env.GO_VERSION }}
- name: Setup Kind Cluster
uses: helm/kind-action@a1b0e391336a6ee6713a0583f8c6240d70863de3 # v1.12.0
with:
node_image: ${{ env.KIND_IMAGE }}
cluster_name: ${{ env.KIND_CLUSTER_NAME }}
config: ./test/kind-conf-with-vpa.yaml
version: ${{ env.KIND_VERSION }}
- name: Build image
run: |
export IMAGE="openkruise/kruise-manager:e2e-${GITHUB_RUN_ID}"
docker build --pull --no-cache . -t $IMAGE
kind load docker-image --name=${KIND_CLUSTER_NAME} $IMAGE || { echo >&2 "kind not installed or error loading image: $IMAGE"; exit 1; }
- name: Install Kruise
run: |
IMG=openkruise/kruise-manager:e2e-${GITHUB_RUN_ID} make install-kruise
- name: Run E2E Tests
run: |
export KUBECONFIG=/home/runner/.kube/config
tools/hack/run-kruise-e2e-test.sh --focus 'DaemonSet' --print-info
sidecar:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
submodules: true
- name: Setup Go
uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
with:
go-version: ${{ env.GO_VERSION }}
- name: Setup Kind Cluster
uses: helm/kind-action@a1b0e391336a6ee6713a0583f8c6240d70863de3 # v1.12.0
with:
node_image: ${{ env.KIND_IMAGE }}
cluster_name: ${{ env.KIND_CLUSTER_NAME }}
config: ./test/kind-conf-with-vpa.yaml
version: ${{ env.KIND_VERSION }}
- name: Build image
run: |
export IMAGE="openkruise/kruise-manager:e2e-${GITHUB_RUN_ID}"
docker build --pull --no-cache . -t $IMAGE
kind load docker-image --name=${KIND_CLUSTER_NAME} $IMAGE || { echo >&2 "kind not installed or error loading image: $IMAGE"; exit 1; }
- name: Install Kruise
run: |
IMG=openkruise/kruise-manager:e2e-${GITHUB_RUN_ID} make install-kruise
- name: Run E2E Tests
run: |
export KUBECONFIG=/home/runner/.kube/config
tools/hack/run-kruise-e2e-test.sh --focus 'SidecarSet|SidecarTerminator|ContainerPriority' --print-info
job-workload:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
submodules: true
- name: Setup Go
uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
with:
go-version: ${{ env.GO_VERSION }}
- name: Setup Kind Cluster
uses: helm/kind-action@a1b0e391336a6ee6713a0583f8c6240d70863de3 # v1.12.0
with:
node_image: ${{ env.KIND_IMAGE }}
cluster_name: ${{ env.KIND_CLUSTER_NAME }}
config: ./test/kind-conf-with-vpa.yaml
version: ${{ env.KIND_VERSION }}
- name: Build image
run: |
export IMAGE="openkruise/kruise-manager:e2e-${GITHUB_RUN_ID}"
docker build --pull --no-cache . -t $IMAGE
kind load docker-image --name=${KIND_CLUSTER_NAME} $IMAGE || { echo >&2 "kind not installed or error loading image: $IMAGE"; exit 1; }
- name: Install Kruise
run: |
IMG=openkruise/kruise-manager:e2e-${GITHUB_RUN_ID} make install-kruise
- name: Run E2E Tests
run: |
export KUBECONFIG=/home/runner/.kube/config
tools/hack/run-kruise-e2e-test.sh --focus '(EphemeralJob|BroadcastJob)' --print-info
policy:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
submodules: true
- name: Setup Go
uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
with:
go-version: ${{ env.GO_VERSION }}
- name: Setup Kind Cluster
uses: helm/kind-action@a1b0e391336a6ee6713a0583f8c6240d70863de3 # v1.12.0
with:
node_image: ${{ env.KIND_IMAGE }}
cluster_name: ${{ env.KIND_CLUSTER_NAME }}
config: ./test/kind-conf-with-vpa.yaml
version: ${{ env.KIND_VERSION }}
- name: Build image
run: |
export IMAGE="openkruise/kruise-manager:e2e-${GITHUB_RUN_ID}"
docker build --pull --no-cache . -t $IMAGE
kind load docker-image --name=${KIND_CLUSTER_NAME} $IMAGE || { echo >&2 "kind not installed or error loading image: $IMAGE"; exit 1; }
- name: Install Kruise
run: |
IMG=openkruise/kruise-manager:e2e-${GITHUB_RUN_ID} make install-kruise
- name: Run E2E Tests
run: |
export KUBECONFIG=/home/runner/.kube/config
tools/hack/run-kruise-e2e-test.sh --focus '(PodUnavailableBudget|DeletionProtection)' --print-info
cloneset:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
submodules: true
- name: Setup Go
uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
with:
go-version: ${{ env.GO_VERSION }}
- name: Setup Kind Cluster
uses: helm/kind-action@a1b0e391336a6ee6713a0583f8c6240d70863de3 # v1.12.0
with:
node_image: ${{ env.KIND_IMAGE }}
cluster_name: ${{ env.KIND_CLUSTER_NAME }}
config: ./test/kind-conf-with-vpa.yaml
version: ${{ env.KIND_VERSION }}
- name: Install-CSI
run: |
make install-csi
- name: Build image
run: |
export IMAGE="openkruise/kruise-manager:e2e-${GITHUB_RUN_ID}"
docker build --pull --no-cache . -t $IMAGE
kind load docker-image --name=${KIND_CLUSTER_NAME} $IMAGE || { echo >&2 "kind not installed or error loading image: $IMAGE"; exit 1; }
- name: Install Kruise
run: |
IMG=openkruise/kruise-manager:e2e-${GITHUB_RUN_ID} make install-kruise
- name: Run E2E Tests
run: |
export KUBECONFIG=/home/runner/.kube/config
tools/hack/run-kruise-e2e-test.sh --focus '(CloneSet|ContainerMeta|InplaceVPA)' --print-info
multidomain:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
submodules: true
- name: Setup Go
uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
with:
go-version: ${{ env.GO_VERSION }}
- name: Setup Kind Cluster
uses: helm/kind-action@a1b0e391336a6ee6713a0583f8c6240d70863de3 # v1.12.0
with:
node_image: ${{ env.KIND_IMAGE }}
cluster_name: ${{ env.KIND_CLUSTER_NAME }}
config: ./test/kind-conf-with-vpa.yaml
version: ${{ env.KIND_VERSION }}
- name: Build image
run: |
export IMAGE="openkruise/kruise-manager:e2e-${GITHUB_RUN_ID}"
docker build --pull --no-cache . -t $IMAGE
kind load docker-image --name=${KIND_CLUSTER_NAME} $IMAGE || { echo >&2 "kind not installed or error loading image: $IMAGE"; exit 1; }
- name: Install Kruise
run: |
ENABLE_E2E_CONFIG=true IMG=openkruise/kruise-manager:e2e-${GITHUB_RUN_ID} make install-kruise
- name: Run E2E Tests
run: |
export KUBECONFIG=/home/runner/.kube/config
tools/hack/run-kruise-e2e-test.sh --focus '(UnitedDeployment|WorkloadSpread)' --print-info

View File

@ -15,12 +15,12 @@ permissions: read-all
jobs: jobs:
license_check: license_check:
runs-on: ubuntu-20.04 runs-on: ubuntu-24.04
name: Check for unapproved licenses name: Check for unapproved licenses
steps: steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Set up Ruby - name: Set up Ruby
uses: ruby/setup-ruby@28c4deda893d5a96a6b2d958c5b47fc18d65c9d3 # v1.213.0 uses: ruby/setup-ruby@efbf473cab83af4468e8606cc33eca9281bb213f # v1.256.0
with: with:
ruby-version: 2.6 ruby-version: 2.6
- name: Install dependencies - name: Install dependencies

View File

@ -37,7 +37,7 @@ jobs:
persist-credentials: false persist-credentials: false
- name: "Run analysis" - name: "Run analysis"
uses: ossf/scorecard-action@62b2cac7ed8198b15735ed49ab1e5cf35480ba46 # v2.4.0 uses: ossf/scorecard-action@05b42c624433fc40578a4040d5cf5e36ddca8cde # v2.4.2
with: with:
results_file: results.sarif results_file: results.sarif
results_format: sarif results_format: sarif
@ -67,6 +67,6 @@ jobs:
# Upload the results to GitHub's code scanning dashboard. # Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning" - name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@dd746615b3b9d728a6a37ca2045b68ca76d4841a # v2.25.0 uses: github/codeql-action/upload-sarif@df559355d593797519d70b90fc8edd5db049e7a2 # v2.25.0
with: with:
sarif_file: results.sarif sarif_file: results.sarif

View File

@ -1,93 +1,73 @@
# options for analysis running version: "2"
run: run:
# default concurrency is a available CPU number
concurrency: 4 concurrency: 4
# timeout for analysis, e.g. 30s, 5m, default is 1m
deadline: 5m
# exit code when at least one issue was found, default is 1
issues-exit-code: 1 issues-exit-code: 1
# include test files or not, default is true
tests: true tests: true
# list of build tags, all linters use it. Default is empty list.
#build-tags:
# - mytag
# which dirs to skip: they won't be analyzed;
# can use regexp here: generated.*, regexp is applied on full path;
# default value is empty list, but next dirs are always skipped independently
# from this option's value:
# third_party$, testdata$, examples$, Godeps$, builtin$
skip-dirs:
- apis
- pkg/client
- vendor
- test
# which files to skip: they will be analyzed, but issues from them
# won't be reported. Default value is empty list, but there is
# no need to include all autogenerated files, we confidently recognize
# autogenerated files. If it's not please let us know.
skip-files:
# - ".*\\.my\\.go$"
# - lib/bad.go
# output configuration options # output configuration options
output: output:
# colored-line-number|line-number|json|tab|checkstyle, default is "colored-line-number" formats:
format: colored-line-number text:
path: stdout
# print lines of code with issue, default is true colors: true
print-issued-lines: true
# print linter name in the end of issue text, default is true
print-linter-name: true
# all available settings of specific linters
linters-settings:
golint:
# minimal confidence for issues, default is 0.8
min-confidence: 0.8
gofmt:
# simplify code: gofmt with `-s` option, true by default
simplify: true
goimports:
# put imports beginning with prefix after 3rd-party packages;
# it's a comma-separated list of prefixes
#local-prefixes: github.com/openkruise/kruise
misspell:
# Correct spellings using locale preferences for US or UK.
# Default is to use a neutral variety of English.
# Setting locale to US will correct the British spelling of 'colour' to 'color'.
locale: default
#ignore-words:
# - someword
depguard:
rules:
forbid-pkg-errors:
deny:
- pkg: "github.com/pkg/errors"
dsc: Should be replaced with standard lib errors or fmt.Errorf
linters: linters:
fast: false default: none
disable-all: true
enable: enable:
# TODO Enforce the below linters later - depguard
- gofmt
- govet - govet
- goimports
- ineffassign - ineffassign
- misspell - misspell
- vet
- unconvert - unconvert
- unused - unused
- depguard settings:
issues: misspell:
exclude: # Correct spellings using locale preferences for US or UK.
# staticcheck # Default is to use a neutral variety of English.
- 'SA1019: package github.com/golang/protobuf/proto is deprecated: Use the "google.golang.org/protobuf/proto" package instead' # Setting locale to US will correct the British spelling of 'colour' to 'color'.
locale: US
depguard:
rules:
forbid-pkg-errors:
deny:
- pkg: "github.com/pkg/errors"
desc: Should be replaced with standard lib errors or fmt.Errorf
exclusions:
generated: lax
presets:
- comments
- common-false-positives
- legacy
- std-error-handling
rules:
- path: (.+)\.go$
text: 'SA1019: package github.com/golang/protobuf/proto is deprecated: Use the "google.golang.org/protobuf/proto" package instead'
paths:
- third_party$
- builtin$
- examples$
- apis
- pkg/client
- vendor
- test
formatters:
enable:
- gofmt
- goimports
settings:
gofmt:
simplify: true
goimports:
# put imports beginning with prefix after 3rd-party packages;
local-prefixes:
- github.com/openkruise/kruise
exclusions:
generated: lax
paths:
- third_party$
- builtin$
- examples$
- apis
- pkg/client
- vendor
- test

View File

@ -1,5 +1,93 @@
# Change Log # Change Log
## v1.8.2
> Change log since v1.8.1
### Bug fixes
- Fix kruise-daemon panic exception due to PodProbeMarker when container is nil. ([#1974](https://github.com/openkruise/kruise/pull/1974), [@zmberg](https://github.com/zmberg))
## v1.8.1
> Change log since v1.8.0
### Bug fixes
- JobSidecarTerminator support ignore exit code capability via env. ([#1949](https://github.com/openkruise/kruise/pull/1949), [@zmberg](https://github.com/zmberg))
### Performance Improvements
- Performance optimized PodProbeMarker to reduce many invalid patch operations ([#2007](https://github.com/openkruise/kruise/pull/2007), [@zmberg](https://github.com/zmberg))
## v1.7.4
> Change log since v1.7.3
### Bug fixes
- JobSidecarTerminator support ignore exit code capability via env. ([#1949](https://github.com/openkruise/kruise/pull/1949), [@zmberg](https://github.com/zmberg))
## v1.8.0
> Change log since v1.7.3
### Upgrade Notice
> No, really, you must read this before you upgrade
- **Disable** the following feature gates by default: ResourcesDeletionProtection ([#1919](https://github.com/openkruise/kruise/pull/1919), [@ABNER-1](https://github.com/ABNER-1))
- Promote these feature gates to beta:
`ResourcesDeletionProtection`, `WorkloadSpread`, `PodUnavailableBudgetDeleteGate`, `InPlaceUpdateEnvFromMetadata`,
`StatefulSetAutoDeletePVC`,
`PodProbeMarkerGate` ([#1919](https://github.com/openkruise/kruise/pull/1919), [@ABNER-1](https://github.com/ABNER-1))
- Update Kubernetes dependency to v1.30.10 and Golang to v1.22 ([#1896](https://github.com/openkruise/kruise/pull/1896), [@ABNER-1](https://github.com/ABNER-1), [#1924](https://github.com/openkruise/kruise/pull/1924), [@furykerry](https://github.com/furykerry)))
- Prior to Kruise 1.7.3, `helm uninstall` is a **high-risk** operation that deletes Kruise, its CRDs, and associated CRs. Starting from Kruise 1.7.3, it uses a pre-delete hook to check for existing Kruise CRs before uninstallation and blocks the process to prevent accidental deletion.
### Key Features
- Support in-place expansion of StatefulSet volumes ([#1674](https://github.com/openkruise/kruise/pull/1674), [#1714](https://github.com/openkruise/kruise/pull/1714), [@ABNER-1](https://github.com/ABNER-1))
- Enable in-place resource resizing for CloneSet, Advanced StatefulSet, and Advanced DaemonSet ([#1353](https://github.com/openkruise/kruise/pull/1353), [#1866](https://github.com/openkruise/kruise/pull/1866), [@LavenderQAQ](https://github.com/LavenderQAQ), [@ABNER-1](https://github.com/ABNER-1))
- Support adaptive scheduling strategy for UnitedDeployment ([#1720](https://github.com/openkruise/kruise/pull/1720), [@AiRanthem](https://github.com/AiRanthem))
- Add WorkloadSpread support for AI workload like TFJob in KubeFlow ([#1838](https://github.com/openkruise/kruise/pull/1838), [@AiRanthem](https://github.com/AiRanthem))
### Performance Improvements
- Optimize CA bundle updates to reduce unnecessary changes ([#1717](https://github.com/openkruise/kruise/pull/1717), [@zmberg](https://github.com/zmberg))
- Add disableDeepCopy for BroadcastJob ([#1696](https://github.com/openkruise/kruise/pull/1696), [@Prepmachine4](https://github.com/Prepmachine4))
### Resilience Enhancement
- Add Helm pre-delete hook to preserve Kruise CRs during uninstallation ([#1843](https://github.com/openkruise/kruise/pull/1843), [@AiRanthem](https://github.com/AiRanthem))
### Other Notable Changes
#### Advanced Workload
- Add lifecycle hooks and tests for Advanced StatefulSet ([#1858](https://github.com/openkruise/kruise/pull/1858), [@mingzhou.swx](https://github.com/mingzhou.swx), [@ABNER-1](https://github.com/ABNER-1))
- Add range-based reserveOrdinals support for Advanced StatefulSet ([#1873](https://github.com/openkruise/kruise/pull/1873), [@AiRanthem](https://github.com/AiRanthem))
- Redefined partition semantics to represent non-updated pod count ([#1819](https://github.com/openkruise/kruise/pull/1819), [@ABNER-1](https://github.com/ABNER-1); [#1751](https://github.com/openkruise/kruise/pull/1751), [@zybtakeit](https://github.com/zybtakeit), [@ABNER-1](https://github.com/ABNER-1))
#### Sidecar Management
- Support inject both stable and updated version sidecar according to updateStrategy ([#1689](https://github.com/openkruise/kruise/pull/1689), [#1856](https://github.com/openkruise/kruise/pull/1856), [@AiRanthem](https://github.com/AiRanthem))
- Refine SidecarSet initContainer handling ([#1719](https://github.com/openkruise/kruise/pull/1719), [@zmberg](https://github.com/zmberg))
#### Multi-domain management
- Introduce `pub.kruise.io/disable-fetch-replicas-from-workload=true` annotation for CRD compatibility ([#1758](https://github.com/openkruise/kruise/pull/1758), [@zmberg](https://github.com/zmberg))
- Extend PodProbeMarker to serverless pods ([#1875](https://github.com/openkruise/kruise/pull/1875), [@zmberg](https://github.com/zmberg))
- Enable priorityClassName patching in WorkloadSpread ([#1877](https://github.com/openkruise/kruise/pull/1877), [@AiRanthem](https://github.com/AiRanthem))
- Sync all fields in UnitedDeployment spec to subset workload spec ([#1798](https://github.com/openkruise/kruise/pull/1798), [@AiRanthem](https://github.com/AiRanthem))
### Bug Fixes
- Resolve token permission and dependency pinning issues ([#1707](https://github.com/openkruise/kruise/pull/1707), [@harshitasao](https://github.com/harshitasao))
- Fix PyTorchJob pod creation failures ([#1864](https://github.com/openkruise/kruise/pull/1864), [@zmberg](https://github.com/zmberg))
- Correct ImagePullJob timeout handling (>1800s) ([#1874](https://github.com/openkruise/kruise/pull/1874), [@zmberg](https://github.com/zmberg))
- Resolve cri-dockerd runtime detection issues ([#1899](https://github.com/openkruise/kruise/pull/1899), [@FlikweertvisionVadym](https://github.com/FlikweertvisionVadym))
- Remove pod ownerRef requirement in pub webhook ([#1869](https://github.com/openkruise/kruise/pull/1869), [@zmberg](https://github.com/zmberg))
- Address maxUnavailable blocking in SidecarSet updates ([#1834](https://github.com/openkruise/kruise/pull/1834), [@zmberg](https://github.com/zmberg))
- Fix CloneSet controller block from scale expectation leaks ([#1829](https://github.com/openkruise/kruise/pull/1829), [@zmberg](https://github.com/zmberg))
- Enforce imagePullPolicy=Always for ImagePullJob ([#1830](https://github.com/openkruise/kruise/pull/1830), [@zmberg](https://github.com/zmberg))
- Fix WorkloadSpread webhook panics ([#1807](https://github.com/openkruise/kruise/pull/1807), [@AiRanthem](https://github.com/AiRanthem))
### Misc (Chores and tests)
- Standardize on CRI for image pulls ([#1867](https://github.com/openkruise/kruise/pull/1867), [@furykerry](https://github.com/furykerry))
- Introduce JSON log formatting ([#1703](https://github.com/openkruise/kruise/pull/1703), [@zmberg](https://github.com/zmberg))
- Remove Docker runtime dependency ([#1870](https://github.com/openkruise/kruise/pull/1870),[@furykerry](https://github.com/furykerry))
- Improve test parallelism and reliability ([#1743](https://github.com/openkruise/kruise/pull/1743), [@MichaelRren](https://github.com/MichaelRren))
- Enhance WorkloadSpread validation logic ([#1740](https://github.com/openkruise/kruise/pull/1740), [@AiRanthem](https://github.com/AiRanthem))
- Launche Kruise Guru on Gurubase.io ([#1800](https://github.com/openkruise/kruise/pull/1800), [@kursataktas](https://github.com/kursataktas))
- Improve documentation accuracy ([#1824](https://github.com/openkruise/kruise/pull/1824), [@furykerry](https://github.com/furykerry))
- Fix KIND installation issues ([#1688](https://github.com/openkruise/kruise/pull/1688),[@ABNER-1](https://github.com/ABNER-1))
- Avoid overriding namespace config after deploying ([#1772](https://github.com/openkruise/kruise/pull/1772),[@hantmac](https://github.com/hantmac))
- Fix WorkloadSpread test flakiness by removing dependencies ([#1895](https://github.com/openkruise/kruise/pull/1895), [@AiRanthem](https://github.com/AiRanthem))
- Address SidecarSet e2e test failures ([#1724](https://github.com/openkruise/kruise/pull/1724), [@zmberg](https://github.com/zmberg))
- Enhance unit test stability ([#1784](https://github.com/openkruise/kruise/pull/1784), [@AiRanthem](https://github.com/AiRanthem))
## v1.7.3 ## v1.7.3
> Change log since v1.7.2 > Change log since v1.7.2
@ -18,7 +106,7 @@
### Advanced Workload ### Advanced Workload
- Support specified-delete in AdvancedStatefulSet and handle specified deleted pod under maxUnavailable constrain. ([#1734](https://github.com/openkruise/kruise/pull/1734), [@ABNER-1](https://github.com/ABNER-1)) - Support specified-delete in AdvancedStatefulSet and handle specified deleted pod under maxUnavailable constrain. ([#1734](https://github.com/openkruise/kruise/pull/1734), [@ABNER-1](https://github.com/ABNER-1))
## v1.5.5 ## v1.5.5
> Chang log since v1.5.4 > Chang log since v1.5.4
### Advanced Workload ### Advanced Workload
@ -39,7 +127,7 @@
- When CloneSet volumeClaimTemplates changed, always recreate pods and related volumes. ([#1561](https://github.com/openkruise/kruise/pull/1561), [@ABNER-1](https://github.com/ABNER-1)) - When CloneSet volumeClaimTemplates changed, always recreate pods and related volumes. ([#1561](https://github.com/openkruise/kruise/pull/1561), [@ABNER-1](https://github.com/ABNER-1))
- Bump K8s dependency to 1.28, and OpenKruise still works with Kubernetes Version >= 1.18. ([#1598](https://github.com/openkruise/kruise/pull/1598), [@ABNER-1](https://github.com/ABNER-1)) - Bump K8s dependency to 1.28, and OpenKruise still works with Kubernetes Version >= 1.18. ([#1598](https://github.com/openkruise/kruise/pull/1598), [@ABNER-1](https://github.com/ABNER-1))
- SidecarSet support k8s 1.28 Sidecar Containers(initContainers[x].restartPolicy=Always), and significantly improves the lifecycle management of Sidecar containers, - SidecarSet support k8s 1.28 Sidecar Containers(initContainers[x].restartPolicy=Always), and significantly improves the lifecycle management of Sidecar containers,
refer to the [community documentation](https://kubernetes.io/docs/concepts/workloads/pods/sidecar-containers/) for details. ([#1613](https://github.com/openkruise/kruise/pull/1613), [@zmberg](https://github.com/zmberg)) refer to the [community documentation](https://kubernetes.io/docs/concepts/workloads/pods/sidecar-containers/) for details. ([#1613](https://github.com/openkruise/kruise/pull/1613), [@zmberg](https://github.com/zmberg))
- ImagePullJob support for credential provider plugin, e.g. aws. ([#1383](https://github.com/openkruise/kruise/pull/1383), [@Kuromesi](https://github.com/Kuromesi)) - ImagePullJob support for credential provider plugin, e.g. aws. ([#1383](https://github.com/openkruise/kruise/pull/1383), [@Kuromesi](https://github.com/Kuromesi))
- Advanced StatefulSet support [start ordinal](https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#start-ordinal). ([#1643](https://github.com/openkruise/kruise/pull/1643), [@ABNER-1](https://github.com/ABNER-1)) - Advanced StatefulSet support [start ordinal](https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#start-ordinal). ([#1643](https://github.com/openkruise/kruise/pull/1643), [@ABNER-1](https://github.com/ABNER-1))
- Support webhook CA injection using external certification management tool, e.g. [cert-manager](https://cert-manager.io/). ([#1665](https://github.com/openkruise/kruise/pull/1665), [@Kuromesi](https://github.com/Kuromesi)) - Support webhook CA injection using external certification management tool, e.g. [cert-manager](https://cert-manager.io/). ([#1665](https://github.com/openkruise/kruise/pull/1665), [@Kuromesi](https://github.com/Kuromesi))
@ -124,14 +212,14 @@ refer to the [community documentation](https://kubernetes.io/docs/concepts/workl
> No, really, you must read this before you upgrade > No, really, you must read this before you upgrade
- OpenKruise no longer supports Kubernetes versions 1.16, 1.17. - OpenKruise no longer supports Kubernetes versions 1.16, 1.17.
However it's still possible to use OpenKruise with Kubernetes versions 1.16 and 1.17 as long as KruiseDaemon is not enabled(install/upgrade kruise charts with featureGates="KruiseDaemon=false") However it's still possible to use OpenKruise with Kubernetes versions 1.16 and 1.17 as long as KruiseDaemon is not enabled(install/upgrade kruise charts with featureGates="KruiseDaemon=false")
- Kruise-Daemon will no longer support v1alpha2 CRI runtimes. - Kruise-Daemon will no longer support v1alpha2 CRI runtimes.
However it's still possible to use OpenKruise on Kubernetes with nodes that only support v1alpha2 CRI as long as KruiseDaemon is not enabled(install/upgrade kruise charts with featureGates="KruiseDaemon=false") However it's still possible to use OpenKruise on Kubernetes with nodes that only support v1alpha2 CRI as long as KruiseDaemon is not enabled(install/upgrade kruise charts with featureGates="KruiseDaemon=false")
- OpenKruise leader election default to use leases mode. ([#1407](https://github.com/openkruise/kruise/pull/1407), [dsxing](https://github.com/dsxing)) - OpenKruise leader election default to use leases mode. ([#1407](https://github.com/openkruise/kruise/pull/1407), [dsxing](https://github.com/dsxing))
For users with OpenKruise version 1.3.0 or lower, please first upgrade your OpenKruise to version 1.4 or 1.5 before upgrading to 1.6.0, so as to avoid unexpected multiple leader problem during the installation. For users with OpenKruise version 1.3.0 or lower, please first upgrade your OpenKruise to version 1.4 or 1.5 before upgrading to 1.6.0, so as to avoid unexpected multiple leader problem during the installation.
- Bump Kubernetes dependency to 1.26.10. ([#1511](https://github.com/openkruise/kruise/pull/1511), [KaiShi](https://github.com/BH4AWS)) - Bump Kubernetes dependency to 1.26.10. ([#1511](https://github.com/openkruise/kruise/pull/1511), [KaiShi](https://github.com/BH4AWS))
- To avoid potential circular dependency problem, features rely on webhook will no longer work for resources under kube-system, - To avoid potential circular dependency problem, features rely on webhook will no longer work for resources under kube-system,
e.g. SidecarSet, WorkloadSpread, PodUnavailableBudget, ContainerLaunchPriority and PersistentPodState. ([#92](https://github.com/openkruise/charts/pull/92), [@hantmac](https://github.com/hantmac)) e.g. SidecarSet, WorkloadSpread, PodUnavailableBudget, ContainerLaunchPriority and PersistentPodState. ([#92](https://github.com/openkruise/charts/pull/92), [@hantmac](https://github.com/hantmac))
### Key Features ### Key Features
- Fix WorkloadSpread incorrect subset allocation after workload rolling updating. ([#1197](https://github.com/openkruise/kruise/pull/1197), [veophi](https://github.com/veophi)) - Fix WorkloadSpread incorrect subset allocation after workload rolling updating. ([#1197](https://github.com/openkruise/kruise/pull/1197), [veophi](https://github.com/veophi))
@ -266,7 +354,7 @@ thanks!
> No, really, you must read this before you upgrade > No, really, you must read this before you upgrade
- Enable following feature-gates by default: ResourcesDeletionProtection, WorkloadSpread, PodUnavailableBudgetDeleteGate, InPlaceUpdateEnvFromMetadata, - Enable following feature-gates by default: ResourcesDeletionProtection, WorkloadSpread, PodUnavailableBudgetDeleteGate, InPlaceUpdateEnvFromMetadata,
StatefulSetAutoDeletePVC, PodProbeMarkerGate. ([#1214](https://github.com/openkruise/kruise/pull/1214), [@zmberg](https://github.com/zmberg)) StatefulSetAutoDeletePVC, PodProbeMarkerGate. ([#1214](https://github.com/openkruise/kruise/pull/1214), [@zmberg](https://github.com/zmberg))
- Change Kruise leader election from configmap to configmapsleases, this is a smooth upgrade with no disruption to OpenKruise service. ([#1184](https://github.com/openkruise/kruise/pull/1184), [@YTGhost](https://github.com/YTGhost)) - Change Kruise leader election from configmap to configmapsleases, this is a smooth upgrade with no disruption to OpenKruise service. ([#1184](https://github.com/openkruise/kruise/pull/1184), [@YTGhost](https://github.com/YTGhost))
### New Feature: JobSidecarTerminator ### New Feature: JobSidecarTerminator
@ -328,7 +416,7 @@ So the Probe capabilities provided in Kubernetes have defined specific semantics
**In addition, there is actually a need to customize Probe semantics and related behaviors**, such as: **In addition, there is actually a need to customize Probe semantics and related behaviors**, such as:
- **GameServer defines Idle Probe to determine whether the Pod currently has a game match**, if not, from the perspective of cost optimization, the Pod can be scaled down. - **GameServer defines Idle Probe to determine whether the Pod currently has a game match**, if not, from the perspective of cost optimization, the Pod can be scaled down.
- **K8S Operator defines the main-secondary probe to determine the role of the current Pod (main or secondary)**. When upgrading, the secondary can be upgraded first, - **K8S Operator defines the main-secondary probe to determine the role of the current Pod (main or secondary)**. When upgrading, the secondary can be upgraded first,
so as to achieve the behavior of selecting the main only once during the upgrade process, reducing the service interruption time during the upgrade process. so as to achieve the behavior of selecting the main only once during the upgrade process, reducing the service interruption time during the upgrade process.
So we provides the ability to customize the Probe and return the result to the Pod yaml. So we provides the ability to customize the Probe and return the result to the Pod yaml.
@ -875,7 +963,7 @@ spec:
Since v0.7.0: Since v0.7.0:
1. OpenKruise requires Kubernetes 1.13+ because of CRD conversion. 1. OpenKruise requires Kubernetes 1.13+ because of CRD conversion.
Note that for Kubernetes 1.13 and 1.14, users must enable `CustomResourceWebhookConversion` feature-gate in kube-apiserver before install or upgrade Kruise. Note that for Kubernetes 1.13 and 1.14, users must enable `CustomResourceWebhookConversion` feature-gate in kube-apiserver before install or upgrade Kruise.
2. OpenKruise official image supports multi-arch, by default including linux/amd64, linux/arm64, and linux/arm platforms. 2. OpenKruise official image supports multi-arch, by default including linux/amd64, linux/arm64, and linux/arm platforms.
### A NEW workload controller - AdvancedCronJob ### A NEW workload controller - AdvancedCronJob
@ -1223,4 +1311,4 @@ It provides full features for more efficient, deterministic and controlled deplo
#### Features #### Features
- Add SidecarSet that automatically injects sidecar container into selected pods - Add SidecarSet that automatically injects sidecar container into selected pods
- Support sidecar update functionality for SidecarSet - Support sidecar update functionality for SidecarSet

View File

@ -1,6 +1,6 @@
# Contributing to Openkruise # Contributing to Openkruise
Welcome to Openkruise! Openkruise consists several repositories under the organization. Welcome to Openkruise! Openkruise consists of several repositories under the organization.
We encourage you to help out by reporting issues, improving documentation, fixing bugs, or adding new features. We encourage you to help out by reporting issues, improving documentation, fixing bugs, or adding new features.
Please also take a look at our code of conduct, which details how contributors are expected to conduct themselves as part of the Openkruise community. Please also take a look at our code of conduct, which details how contributors are expected to conduct themselves as part of the Openkruise community.
@ -10,7 +10,7 @@ To be honest, we regard every user of Openkruise as a very kind contributor.
After experiencing Openkruise, you may have some feedback for the project. After experiencing Openkruise, you may have some feedback for the project.
Then feel free to open an issue. Then feel free to open an issue.
There are lot of cases when you could open an issue: There are a lot of cases when you could open an issue:
- bug report - bug report
- feature request - feature request
@ -20,11 +20,11 @@ There are lot of cases when you could open an issue:
- help wanted - help wanted
- doc incomplete - doc incomplete
- test improvement - test improvement
- any questions on project - any questions on the project
- and so on - and so on
Also we must remind that when filing a new issue, please remember to remove the sensitive data from your post. Also, we must remind you that when filing a new issue, please remember to remove the sensitive data from your post.
Sensitive data could be password, secret key, network locations, private business data and so on. Sensitive data could be passwords, secret keys, network locations, private business data, and so on.
## Code and doc contribution ## Code and doc contribution
@ -45,13 +45,14 @@ On GitHub, every improvement for Openkruise could be via a PR (short for pull re
### Workspace Preparation ### Workspace Preparation
To put forward a PR, we assume you have registered a GitHub ID. To put forward a PR, we assume you have registered a GitHub ID.
Then you could finish the preparation in the following steps: Then you can finish the preparation in the following steps:
1. **Fork** Fork the repository you wish to work on. You just need to click the button Fork in right-left of project repository main page. Then you will end up with your repository in your GitHub username. 1. **Fork** Fork the repository you wish to work on. You just need to click the button Fork in the right-left of the project repository main page. Then you will end up with your repository in your GitHub username.
2. **Clone** your own repository to develop locally. Use `git clone https://github.com/<your-username>/<project>.git` to clone repository to your local machine. Then you can create new branches to finish the change you wish to make. 2. **Clone** your own repository to develop locally. Use `git clone https://github.com/<your-username>/<project>.git` to clone the repository to your local machine. Then you can create new branches to finish the change you wish to make.
3. **Set remote** upstream to be `https://github.com/openkruise/<project>.git` using the following two commands: 3. **Set remote** upstream to be `https://github.com/openkruise/<project>.git` using the following two commands:
```bash ```bash
cd <project>
git remote add upstream https://github.com/openkruise/<project>.git git remote add upstream https://github.com/openkruise/<project>.git
git remote set-url --push upstream no-pushing git remote set-url --push upstream no-pushing
``` ```
@ -60,7 +61,7 @@ Adding this, we can easily synchronize local branches with upstream branches.
4. **Create a branch** to add a new feature or fix issues 4. **Create a branch** to add a new feature or fix issues
Update local working directory: Update the local working directory:
```bash ```bash
cd <project> cd <project>
@ -79,16 +80,16 @@ Make any change on the new-branch then build and test your codes.
### PR Description ### PR Description
PR is the only way to make change to Kruise project files. PR is the only way to make changes to Kruise project files.
To help reviewers better get your purpose, PR description could not be too detailed. To help reviewers better understand your purpose, PR description could not be too detailed.
We encourage contributors to follow the [PR template](./.github/PULL_REQUEST_TEMPLATE.md) to finish the pull request. We encourage contributors to follow the [PR template](./.github/PULL_REQUEST_TEMPLATE.md) to finish the pull request.
### Developing Environment ### Developing Environment
As a contributor, if you want to make any contribution to Kruise project, we should reach an agreement on the version of tools used in the development environment. As a contributor, if you want to make any contribution to the Kruise project, we should reach an agreement on the version of tools used in the development environment.
Here are some dependents with specific version: Here are some dependencies with specific versions:
- Golang : v1.18+ - Golang : v1.22+
- Kubernetes: v1.16+ - Kubernetes: v1.16+
### Developing guide ### Developing guide
@ -106,14 +107,14 @@ make build
make test make test
``` ```
**There are some guide documents for contributors in [./docs/contributing/](./docs/contributing), such as debug guide to help you test your own branch in a Kubernetes cluster.** **There are some guide documents for contributors in [./docs/contributing/](./docs/contributing), such as a debug guide to help you test your own branch in a Kubernetes cluster.**
### Proposals ### Proposals
If you are going to contribute a feature with new API or needs significant effort, please submit a proposal in [./docs/proposals/](./docs/proposals) first. If you are going to contribute a feature with a new API or need significant effort, please submit a proposal in [./docs/proposals/](./docs/proposals) first.
### Kruise Helm Charts ### Kruise Helm Charts
[kruise charts](https://github.com/openkruise/charts) is openKruise charts repo, include kruise, kruise rollout, kruise game. [kruise charts](https://github.com/openkruise/charts) is the openKruise charts repo, including kruise, kruise rollout, and kruise game.
You can add the corresponding charts package in the versions directory as follows: You can add the corresponding charts package in the versions directory as follows:
``` ```
versions versions
@ -133,13 +134,13 @@ You can add the corresponding charts package in the versions directory as follow
We choose GitHub as the primary place for Openkruise to collaborate. We choose GitHub as the primary place for Openkruise to collaborate.
So the latest updates of Openkruise are always here. So the latest updates of Openkruise are always here.
Although contributions via PR is an explicit way to help, we still call for any other ways. Although contributions via PR are an explicit way to help, we still call for any other ways.
- reply to other's issues if you could; - reply to other's issues if you could;
- help solve other user's problems; - help solve other user's problems;
- help review other's PR design; - help review other's PR design;
- help review other's codes in PR; - help review other's codes in PR;
- discuss about Openkruise to make things clearer; - discuss Openkruise to make things clearer;
- advocate Openkruise technology beyond GitHub; - advocate Openkruise technology beyond GitHub;
- write blogs on Openkruise and so on. - write blogs on Openkruise and so on.
@ -147,5 +148,5 @@ In a word, **ANY HELP IS CONTRIBUTION**.
## Join Openkruise as a member ## Join Openkruise as a member
It is also welcomed to join Openkruise team if you are willing to participate in Openkruise community continuously and keep active. It is also welcomed to join the Openkruise team if you are willing to participate in the Openkruise community continuously and keep active.
Please read and follow the [Community Membership](https://github.com/openkruise/community/blob/master/community-membership.md). Please read and follow the [Community Membership](https://github.com/openkruise/community/blob/master/community-membership.md).

View File

@ -1,7 +1,7 @@
# Build the manager and daemon binaries # Build the manager and daemon binaries
ARG BASE_IMAGE=alpine ARG BASE_IMAGE=alpine
ARG BASE_IMAGE_VERSION=3.21@sha256:56fa17d2a7e7f168a043a2712e63aed1f8543aeafdcee47c58dcffe38ed51099 ARG BASE_IMAGE_VERSION=3.21@sha256:56fa17d2a7e7f168a043a2712e63aed1f8543aeafdcee47c58dcffe38ed51099
FROM golang:1.22.11-alpine3.21@sha256:161858498a61ce093c8e2bd704299bfb23e5bff79aef99b6c40bb9c6a43acf0f AS builder FROM golang:1.23.9-alpine3.21@sha256:fb7ea5cd19bc4eea3eb0d1972919ec0f6229b138985ce4b35ce5846c6bc02973 AS builder
WORKDIR /workspace WORKDIR /workspace
# Copy the Go Modules manifests # Copy the Go Modules manifests
COPY go.mod go.mod COPY go.mod go.mod

11
Dockerfile_windows Normal file
View File

@ -0,0 +1,11 @@
# Build Windows image for kruise-daemon
# Using Windows HostProcess container base image: https://github.com/microsoft/windows-host-process-containers-base-image
ARG BASE_IMAGE=mcr.microsoft.com/oss/kubernetes/windows-host-process-containers-base-image
ARG BASE_IMAGE_VERSION=v1.0.0
FROM ${BASE_IMAGE}:${BASE_IMAGE_VERSION}
WORKDIR /
COPY ./bin/kruise-daemon.exe .
ENTRYPOINT ["kruise-daemon.exe"]

View File

@ -1,8 +1,10 @@
# Image URL to use all building/pushing image targets # Image URL to use all building/pushing image targets
IMG ?= openkruise/kruise-manager:test IMG ?= openkruise/kruise-manager:test
HOOK_IMG ?= openkruise/kruise-helm-hook:test HOOK_IMG ?= openkruise/kruise-helm-hook:test
WIN_DAEMON_IMG ?= openkruise/kruise-daemon-win:test
# Platforms to build the image for # Platforms to build the image for
PLATFORMS ?= linux/amd64,linux/arm64,linux/ppc64le PLATFORMS ?= linux/amd64,linux/arm64,linux/ppc64le
WIN_PLATFORMS ?= windows/amd64
CRD_OPTIONS ?= "crd:crdVersions=v1" CRD_OPTIONS ?= "crd:crdVersions=v1"
# Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set) # Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set)
@ -15,7 +17,7 @@ GOOS ?= $(shell go env GOOS)
# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary. # ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary.
# Run `setup-envtest list` to list available versions. # Run `setup-envtest list` to list available versions.
ENVTEST_K8S_VERSION ?= 1.30.0 ENVTEST_K8S_VERSION ?= 1.32.0
# Setting SHELL to bash allows bash commands to be executed by recipes. # Setting SHELL to bash allows bash commands to be executed by recipes.
# This is a requirement for 'setup-envtest.sh' in the test target. # This is a requirement for 'setup-envtest.sh' in the test target.
@ -28,7 +30,7 @@ all: build
##@ Development ##@ Development
go_check: go_check:
@scripts/check_go_version "1.22" @scripts/check_go_version "1.23"
generate: controller-gen ## Generate code containing DeepCopy, DeepCopyInto, and DeepCopyObject method implementations. generate: controller-gen ## Generate code containing DeepCopy, DeepCopyInto, and DeepCopyObject method implementations.
@scripts/generate_client.sh @scripts/generate_client.sh
@ -36,7 +38,7 @@ generate: controller-gen ## Generate code containing DeepCopy, DeepCopyInto, and
$(CONTROLLER_GEN) object:headerFile="hack/boilerplate.go.txt" paths="./apis/..." $(CONTROLLER_GEN) object:headerFile="hack/boilerplate.go.txt" paths="./apis/..."
manifests: controller-gen ## Generate WebhookConfiguration, ClusterRole and CustomResourceDefinition objects. manifests: controller-gen ## Generate WebhookConfiguration, ClusterRole and CustomResourceDefinition objects.
$(CONTROLLER_GEN) $(CRD_OPTIONS) rbac:roleName=manager-role webhook paths="./pkg/..." output:crd:artifacts:config=config/crd/bases $(CONTROLLER_GEN) $(CRD_OPTIONS) rbac:roleName=manager-role webhook paths="./apis/..." output:crd:artifacts:config=config/crd/bases
fmt: go_check ## Run go fmt against code. fmt: go_check ## Run go fmt against code.
go fmt $(shell go list ./... | grep -v /vendor/) go fmt $(shell go list ./... | grep -v /vendor/)
@ -50,14 +52,16 @@ lint: golangci-lint ## Run golangci-lint against code.
test: generate fmt vet manifests envtest ## Run tests test: generate fmt vet manifests envtest ## Run tests
echo $(ENVTEST) echo $(ENVTEST)
go build -o pkg/daemon/criruntime/imageruntime/fake_plugin/fake-credential-plugin pkg/daemon/criruntime/imageruntime/fake_plugin/main.go && chmod +x pkg/daemon/criruntime/imageruntime/fake_plugin/fake-credential-plugin go build -o pkg/daemon/criruntime/imageruntime/fake_plugin/fake-credential-plugin pkg/daemon/criruntime/imageruntime/fake_plugin/main.go && chmod +x pkg/daemon/criruntime/imageruntime/fake_plugin/fake-credential-plugin
KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(ENVTEST_K8S_VERSION) -p path)" go test -race ./pkg/... -coverprofile cover.out KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(ENVTEST_K8S_VERSION) -p path)" go test -race ./pkg/... -coverprofile raw-cover.out
rm pkg/daemon/criruntime/imageruntime/fake_plugin/fake-credential-plugin rm pkg/daemon/criruntime/imageruntime/fake_plugin/fake-credential-plugin
grep -v "pkg/client" raw-cover.out > cover.out
atest: atest:
echo $(ENVTEST) echo $(ENVTEST)
go build -o pkg/daemon/criruntime/imageruntime/fake_plugin/fake-credential-plugin pkg/daemon/criruntime/imageruntime/fake_plugin/main.go && chmod +x pkg/daemon/criruntime/imageruntime/fake_plugin/fake-credential-plugin go build -o pkg/daemon/criruntime/imageruntime/fake_plugin/fake-credential-plugin pkg/daemon/criruntime/imageruntime/fake_plugin/main.go && chmod +x pkg/daemon/criruntime/imageruntime/fake_plugin/fake-credential-plugin
KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(ENVTEST_K8S_VERSION) -p path)" go test -race ./pkg/... -coverprofile cover.out KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(ENVTEST_K8S_VERSION) -p path)" go test -race ./pkg/... -coverprofile raw-cover.out
rm pkg/daemon/criruntime/imageruntime/fake_plugin/fake-credential-plugin rm pkg/daemon/criruntime/imageruntime/fake_plugin/fake-credential-plugin
grep -v "pkg/client" raw-cover.out > cover.out
coverage-report: ## Generate cover.html from cover.out coverage-report: ## Generate cover.html from cover.out
go tool cover -html=cover.out -o cover.html go tool cover -html=cover.out -o cover.html
@ -72,6 +76,9 @@ endif
build: generate fmt vet manifests ## Build manager binary. build: generate fmt vet manifests ## Build manager binary.
go build -o bin/manager main.go go build -o bin/manager main.go
build-win-daemon: ## Build Windows daemon binary.
GOOS=windows go build -o bin/kruise-daemon.exe ./cmd/daemon/main.go
run: manifests generate fmt vet ## Run a controller from your host. run: manifests generate fmt vet ## Run a controller from your host.
go run ./main.go go run ./main.go
@ -81,6 +88,9 @@ docker-build: ## Build docker image with the manager.
docker-push: ## Push docker image with the manager. docker-push: ## Push docker image with the manager.
docker push ${IMG} docker push ${IMG}
docker-win-daemon: # Build Windows docker image with the daemon
docker buildx build -f ./Dockerfile_windows --pull --no-cache --platform=$(WIN_PLATFORMS) . -t $(WIN_DAEMON_IMG)
# Build and push the multiarchitecture docker images and manifest. # Build and push the multiarchitecture docker images and manifest.
docker-multiarch: docker-multiarch:
docker buildx build -f ./Dockerfile_multiarch --pull --no-cache --platform=$(PLATFORMS) --push . -t $(IMG) docker buildx build -f ./Dockerfile_multiarch --pull --no-cache --platform=$(PLATFORMS) --push . -t $(IMG)
@ -109,7 +119,7 @@ controller-gen: ## Download controller-gen locally if necessary.
ifeq ("$(shell $(CONTROLLER_GEN) --version 2> /dev/null)", "Version: v0.16.5") ifeq ("$(shell $(CONTROLLER_GEN) --version 2> /dev/null)", "Version: v0.16.5")
else else
rm -rf $(CONTROLLER_GEN) rm -rf $(CONTROLLER_GEN)
$(call go-get-tool,$(CONTROLLER_GEN),sigs.k8s.io/controller-tools/cmd/controller-gen@v0.16.5) $(call go-get-tool,$(CONTROLLER_GEN),sigs.k8s.io/controller-tools/cmd/controller-gen@v0.17.3)
endif endif
KUSTOMIZE = $(shell pwd)/bin/kustomize KUSTOMIZE = $(shell pwd)/bin/kustomize
kustomize: ## Download kustomize locally if necessary. kustomize: ## Download kustomize locally if necessary.
@ -121,7 +131,7 @@ golangci-lint: ## Download golangci-lint locally if necessary.
GINKGO = $(shell pwd)/bin/ginkgo GINKGO = $(shell pwd)/bin/ginkgo
ginkgo: ## Download ginkgo locally if necessary. ginkgo: ## Download ginkgo locally if necessary.
$(call go-get-tool,$(GINKGO),github.com/onsi/ginkgo/ginkgo@v1.16.4) $(call go-get-tool,$(GINKGO),github.com/onsi/ginkgo/v2/ginkgo@latest)
# go-get-tool will 'go get' any package $2 and install it to $1. # go-get-tool will 'go get' any package $2 and install it to $1.
PROJECT_DIR := $(shell dirname $(abspath $(lastword $(MAKEFILE_LIST)))) PROJECT_DIR := $(shell dirname $(abspath $(lastword $(MAKEFILE_LIST))))
@ -147,11 +157,8 @@ $(TESTBIN):
ENVTEST ?= $(TESTBIN)/setup-envtest ENVTEST ?= $(TESTBIN)/setup-envtest
.PHONY: envtest .PHONY: envtest
envtest: $(ENVTEST) ## Download envtest-setup locally if necessary. envtest: $(TESTBIN) ## Download/update envtest-setup to latest version.
$(ENVTEST): $(TESTBIN) GOBIN=$(TESTBIN) go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest
ifeq (, $(shell ls $(TESTBIN)/setup-envtest 2>/dev/null))
GOBIN=$(TESTBIN) go install sigs.k8s.io/controller-runtime/tools/setup-envtest@c7e1dc9b5302d649d5531e19168dd7ea0013736d
endif
# create-cluster creates a kube cluster with kind. # create-cluster creates a kube cluster with kind.
.PHONY: create-cluster .PHONY: create-cluster
@ -182,11 +189,11 @@ kube-load-image: $(tools/kind)
.PHONY: install-kruise .PHONY: install-kruise
install-kruise: install-kruise:
kubectl create namespace kruise-system; kubectl create namespace kruise-system;
ifeq ($(DISABLE_E2E_CONFIG), true) ifeq ($(ENABLE_E2E_CONFIG), true)
@echo "Skipping e2e config application...";
else
@echo "Applying e2e config..."; @echo "Applying e2e config...";
kubectl apply -f test/kruise-e2e-config.yaml; kubectl apply -f test/kruise-e2e-config.yaml;
else
@echo "Skipping e2e config application...";
endif endif
tools/hack/install-kruise.sh $(IMG) tools/hack/install-kruise.sh $(IMG)

View File

@ -66,6 +66,14 @@ OpenKruise (官网: [https://openkruise.io](https://openkruise.io)) 是CNCF([Clo
- 安装/升级 Kruise [稳定版本](https://openkruise.io/docs/installation) - 安装/升级 Kruise [稳定版本](https://openkruise.io/docs/installation)
- 安装/升级 Kruise [最新版本(包括 alpha/beta/rc](https://openkruise.io/docs/next/installation) - 安装/升级 Kruise [最新版本(包括 alpha/beta/rc](https://openkruise.io/docs/next/installation)
### 在阿里云上快速体验
- 3分钟内在阿里云上创建 Kruise 体验环境:
<a href="https://acs.console.aliyun.com/quick-deploy?repo=openkruise/charts&branch=master&paths=%5B%22versions/kruise/1.7.3%22%5D" target="_blank">
<img src="https://img.alicdn.com/imgextra/i1/O1CN01aiPSuA1Wiz7wkgF5u_!!6000000002823-55-tps-399-70.svg" width="200" alt="Deploy on Alibaba Cloud">
</a>
## 用户 ## 用户
登记: [如果贵司正在使用 Kruise 请留言](https://github.com/openkruise/kruise/issues/289) 登记: [如果贵司正在使用 Kruise 请留言](https://github.com/openkruise/kruise/issues/289)

View File

@ -32,7 +32,7 @@ It consists of several controllers which extend and complement the [Kubernetes c
- **Sidecar container Management** - **Sidecar container Management**
Kruise simplify sidecar injection and enable sidecar in-place update. Kruise also enhance the sidecar startup and termination control. Kruise simplifies sidecar injection and enables sidecar in-place update. Kruise also enhances the sidecar startup and termination control.
- [**SidecarSet** for defining and upgrading your own sidecars](https://openkruise.io/docs/user-manuals/sidecarset) - [**SidecarSet** for defining and upgrading your own sidecars](https://openkruise.io/docs/user-manuals/sidecarset)
- [**Container Launch Priority** to control the container startup orders](https://openkruise.io/docs/user-manuals/containerlaunchpriority) - [**Container Launch Priority** to control the container startup orders](https://openkruise.io/docs/user-manuals/containerlaunchpriority)
@ -68,6 +68,14 @@ You can view the full documentation from the [OpenKruise website](https://openkr
- Install or upgrade Kruise with [the stable version](https://openkruise.io/docs/installation). - Install or upgrade Kruise with [the stable version](https://openkruise.io/docs/installation).
- Install or upgrade Kruise with [the latest version including alpha/beta/rc](https://openkruise.io/docs/next/installation). - Install or upgrade Kruise with [the latest version including alpha/beta/rc](https://openkruise.io/docs/next/installation).
### Get Your Own Demo with Alibaba Cloud
- install Kruise on a Serverless K8S cluster in 3 minutes, try:
<a href="https://acs.console.aliyun.com/quick-deploy?repo=openkruise/charts&branch=master&paths=%5B%22versions/kruise/1.8.0%22%5D" target="_blank">
<img src="https://img.alicdn.com/imgextra/i1/O1CN01aiPSuA1Wiz7wkgF5u_!!6000000002823-55-tps-399-70.svg" width="200" alt="Deploy on Alibaba Cloud">
</a>
## Users ## Users
Registration: [Who is using Kruise](https://github.com/openkruise/kruise/issues/289) Registration: [Who is using Kruise](https://github.com/openkruise/kruise/issues/289)

View File

@ -15,7 +15,7 @@ Look at [the last release](https://github.com/openkruise/kruise/releases/latest)
Add a new section in [CHANGELOG.md](./CHANGELOG.md) for the new version that is being released along with the new features, patches and deprecations it introduces. Add a new section in [CHANGELOG.md](./CHANGELOG.md) for the new version that is being released along with the new features, patches and deprecations it introduces.
It should not include every single change but solely what matters to our customers, for example issue template that has changed is not important. It should not include every single change but solely what matters to our customers, for example, an issue template that has changed is not important.
## 2. Publish documentation for new version ## 2. Publish documentation for new version

View File

@ -1,6 +1,6 @@
Defined below are the security persons of contact for this project. If you have questions regarding the triaging and handling of incoming problems, they may be contacted. Defined below are the security persons of contact for this project. If you have questions regarding the triaging and handling of incoming problems, they may be contacted.
The following security contacts have agreed to abide by the Embargo Policy $LINK and will be removed and replaced if found to be in violation of that agreement. The following security contacts have agreed to abide by the [Embargo Policy](embargo-policy.md) and will be removed and replaced if found to be in violation of that agreement.
DO NOT REPORT SECURITY VULNERABILITIES DIRECTLY TO THESE NAMES, USE THE INSTRUCTIONS AT [SECURITY.md](SECURITY.md) DO NOT REPORT SECURITY VULNERABILITIES DIRECTLY TO THESE NAMES, USE THE INSTRUCTIONS AT [SECURITY.md](SECURITY.md)

View File

@ -192,12 +192,6 @@ func SetDefaultPodVolumes(volumes []corev1.Volume) {
if a.VolumeSource.Secret != nil { if a.VolumeSource.Secret != nil {
v1.SetDefaults_SecretVolumeSource(a.VolumeSource.Secret) v1.SetDefaults_SecretVolumeSource(a.VolumeSource.Secret)
} }
if a.VolumeSource.ISCSI != nil {
v1.SetDefaults_ISCSIVolumeSource(a.VolumeSource.ISCSI)
}
if a.VolumeSource.RBD != nil {
v1.SetDefaults_RBDVolumeSource(a.VolumeSource.RBD)
}
if a.VolumeSource.DownwardAPI != nil { if a.VolumeSource.DownwardAPI != nil {
v1.SetDefaults_DownwardAPIVolumeSource(a.VolumeSource.DownwardAPI) v1.SetDefaults_DownwardAPIVolumeSource(a.VolumeSource.DownwardAPI)
for j := range a.VolumeSource.DownwardAPI.Items { for j := range a.VolumeSource.DownwardAPI.Items {
@ -210,9 +204,6 @@ func SetDefaultPodVolumes(volumes []corev1.Volume) {
if a.VolumeSource.ConfigMap != nil { if a.VolumeSource.ConfigMap != nil {
v1.SetDefaults_ConfigMapVolumeSource(a.VolumeSource.ConfigMap) v1.SetDefaults_ConfigMapVolumeSource(a.VolumeSource.ConfigMap)
} }
if a.VolumeSource.AzureDisk != nil {
v1.SetDefaults_AzureDiskVolumeSource(a.VolumeSource.AzureDisk)
}
if a.VolumeSource.Projected != nil { if a.VolumeSource.Projected != nil {
v1.SetDefaults_ProjectedVolumeSource(a.VolumeSource.Projected) v1.SetDefaults_ProjectedVolumeSource(a.VolumeSource.Projected)
for j := range a.VolumeSource.Projected.Sources { for j := range a.VolumeSource.Projected.Sources {
@ -230,8 +221,5 @@ func SetDefaultPodVolumes(volumes []corev1.Volume) {
} }
} }
} }
if a.VolumeSource.ScaleIO != nil {
v1.SetDefaults_ScaleIOVolumeSource(a.VolumeSource.ScaleIO)
}
} }
} }

View File

@ -23,7 +23,7 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/util/intstr" "k8s.io/apimachinery/pkg/util/intstr"
v1 "k8s.io/kubernetes/pkg/apis/core/v1" v1 "k8s.io/kubernetes/pkg/apis/core/v1"
utilpointer "k8s.io/utils/pointer" "k8s.io/utils/ptr"
"sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil"
) )
@ -70,7 +70,7 @@ func SetDefaultInjectRevision(strategy *v1alpha1.SidecarSetInjectionStrategy) {
func SetDefaultRevisionHistoryLimit(revisionHistoryLimit **int32) { func SetDefaultRevisionHistoryLimit(revisionHistoryLimit **int32) {
if *revisionHistoryLimit == nil { if *revisionHistoryLimit == nil {
*revisionHistoryLimit = utilpointer.Int32Ptr(10) *revisionHistoryLimit = ptr.To(int32(10))
} }
} }
@ -208,7 +208,7 @@ func SetDefaultsBroadcastJob(obj *v1alpha1.BroadcastJob, injectTemplateDefaults
// SetDefaults_UnitedDeployment set default values for UnitedDeployment. // SetDefaults_UnitedDeployment set default values for UnitedDeployment.
func SetDefaultsUnitedDeployment(obj *v1alpha1.UnitedDeployment, injectTemplateDefaults bool) { func SetDefaultsUnitedDeployment(obj *v1alpha1.UnitedDeployment, injectTemplateDefaults bool) {
if obj.Spec.RevisionHistoryLimit == nil { if obj.Spec.RevisionHistoryLimit == nil {
obj.Spec.RevisionHistoryLimit = utilpointer.Int32Ptr(10) obj.Spec.RevisionHistoryLimit = ptr.To(int32(10))
} }
if len(obj.Spec.UpdateStrategy.Type) == 0 { if len(obj.Spec.UpdateStrategy.Type) == 0 {
@ -255,10 +255,10 @@ func SetDefaultsUnitedDeployment(obj *v1alpha1.UnitedDeployment, injectTemplateD
// SetDefaults_CloneSet set default values for CloneSet. // SetDefaults_CloneSet set default values for CloneSet.
func SetDefaultsCloneSet(obj *v1alpha1.CloneSet, injectTemplateDefaults bool) { func SetDefaultsCloneSet(obj *v1alpha1.CloneSet, injectTemplateDefaults bool) {
if obj.Spec.Replicas == nil { if obj.Spec.Replicas == nil {
obj.Spec.Replicas = utilpointer.Int32Ptr(1) obj.Spec.Replicas = ptr.To(int32(1))
} }
if obj.Spec.RevisionHistoryLimit == nil { if obj.Spec.RevisionHistoryLimit == nil {
obj.Spec.RevisionHistoryLimit = utilpointer.Int32Ptr(10) obj.Spec.RevisionHistoryLimit = ptr.To(int32(10))
} }
if injectTemplateDefaults { if injectTemplateDefaults {
@ -370,10 +370,10 @@ func SetDefaultsNodeImage(obj *v1alpha1.NodeImage) {
func SetDefaultsImageTagPullPolicy(obj *v1alpha1.ImageTagPullPolicy) { func SetDefaultsImageTagPullPolicy(obj *v1alpha1.ImageTagPullPolicy) {
if obj.TimeoutSeconds == nil { if obj.TimeoutSeconds == nil {
obj.TimeoutSeconds = utilpointer.Int32Ptr(600) obj.TimeoutSeconds = ptr.To(int32(600))
} }
if obj.BackoffLimit == nil { if obj.BackoffLimit == nil {
obj.BackoffLimit = utilpointer.Int32Ptr(3) obj.BackoffLimit = ptr.To(int32(3))
} }
} }
@ -386,10 +386,10 @@ func SetDefaultsImagePullJob(obj *v1alpha1.ImagePullJob, addProtection bool) {
obj.Spec.PullPolicy = &v1alpha1.PullPolicy{} obj.Spec.PullPolicy = &v1alpha1.PullPolicy{}
} }
if obj.Spec.PullPolicy.TimeoutSeconds == nil { if obj.Spec.PullPolicy.TimeoutSeconds == nil {
obj.Spec.PullPolicy.TimeoutSeconds = utilpointer.Int32Ptr(600) obj.Spec.PullPolicy.TimeoutSeconds = ptr.To(int32(600))
} }
if obj.Spec.PullPolicy.BackoffLimit == nil { if obj.Spec.PullPolicy.BackoffLimit == nil {
obj.Spec.PullPolicy.BackoffLimit = utilpointer.Int32Ptr(3) obj.Spec.PullPolicy.BackoffLimit = ptr.To(int32(3))
} }
if obj.Spec.ImagePullPolicy == "" { if obj.Spec.ImagePullPolicy == "" {
obj.Spec.ImagePullPolicy = v1alpha1.PullIfNotPresent obj.Spec.ImagePullPolicy = v1alpha1.PullIfNotPresent
@ -408,9 +408,9 @@ func SetDefaultsImageListPullJob(obj *v1alpha1.ImageListPullJob) {
obj.Spec.PullPolicy = &v1alpha1.PullPolicy{} obj.Spec.PullPolicy = &v1alpha1.PullPolicy{}
} }
if obj.Spec.PullPolicy.TimeoutSeconds == nil { if obj.Spec.PullPolicy.TimeoutSeconds == nil {
obj.Spec.PullPolicy.TimeoutSeconds = utilpointer.Int32Ptr(600) obj.Spec.PullPolicy.TimeoutSeconds = ptr.To(int32(600))
} }
if obj.Spec.PullPolicy.BackoffLimit == nil { if obj.Spec.PullPolicy.BackoffLimit == nil {
obj.Spec.PullPolicy.BackoffLimit = utilpointer.Int32Ptr(3) obj.Spec.PullPolicy.BackoffLimit = ptr.To(int32(3))
} }
} }

View File

@ -20,7 +20,7 @@ import (
appsv1 "k8s.io/api/apps/v1" appsv1 "k8s.io/api/apps/v1"
"k8s.io/apimachinery/pkg/util/intstr" "k8s.io/apimachinery/pkg/util/intstr"
v1 "k8s.io/kubernetes/pkg/apis/core/v1" v1 "k8s.io/kubernetes/pkg/apis/core/v1"
utilpointer "k8s.io/utils/pointer" "k8s.io/utils/ptr"
"github.com/openkruise/kruise/apis/apps/v1beta1" "github.com/openkruise/kruise/apis/apps/v1beta1"
"github.com/openkruise/kruise/pkg/features" "github.com/openkruise/kruise/pkg/features"
@ -43,7 +43,7 @@ func SetDefaultsStatefulSet(obj *v1beta1.StatefulSet, injectTemplateDefaults boo
obj.Spec.UpdateStrategy.RollingUpdate = &v1beta1.RollingUpdateStatefulSetStrategy{} obj.Spec.UpdateStrategy.RollingUpdate = &v1beta1.RollingUpdateStatefulSetStrategy{}
} }
if obj.Spec.UpdateStrategy.RollingUpdate.Partition == nil { if obj.Spec.UpdateStrategy.RollingUpdate.Partition == nil {
obj.Spec.UpdateStrategy.RollingUpdate.Partition = utilpointer.Int32Ptr(0) obj.Spec.UpdateStrategy.RollingUpdate.Partition = ptr.To(int32(0))
} }
if obj.Spec.UpdateStrategy.RollingUpdate.MaxUnavailable == nil { if obj.Spec.UpdateStrategy.RollingUpdate.MaxUnavailable == nil {
maxUnavailable := intstr.FromInt(1) maxUnavailable := intstr.FromInt(1)
@ -53,7 +53,7 @@ func SetDefaultsStatefulSet(obj *v1beta1.StatefulSet, injectTemplateDefaults boo
obj.Spec.UpdateStrategy.RollingUpdate.PodUpdatePolicy = v1beta1.RecreatePodUpdateStrategyType obj.Spec.UpdateStrategy.RollingUpdate.PodUpdatePolicy = v1beta1.RecreatePodUpdateStrategyType
} }
if obj.Spec.UpdateStrategy.RollingUpdate.MinReadySeconds == nil { if obj.Spec.UpdateStrategy.RollingUpdate.MinReadySeconds == nil {
obj.Spec.UpdateStrategy.RollingUpdate.MinReadySeconds = utilpointer.Int32Ptr(0) obj.Spec.UpdateStrategy.RollingUpdate.MinReadySeconds = ptr.To(int32(0))
} }
} }
@ -76,10 +76,10 @@ func SetDefaultsStatefulSet(obj *v1beta1.StatefulSet, injectTemplateDefaults boo
} }
if obj.Spec.Replicas == nil { if obj.Spec.Replicas == nil {
obj.Spec.Replicas = utilpointer.Int32Ptr(1) obj.Spec.Replicas = ptr.To(int32(1))
} }
if obj.Spec.RevisionHistoryLimit == nil { if obj.Spec.RevisionHistoryLimit == nil {
obj.Spec.RevisionHistoryLimit = utilpointer.Int32Ptr(10) obj.Spec.RevisionHistoryLimit = ptr.To(int32(10))
} }
if injectTemplateDefaults { if injectTemplateDefaults {

View File

@ -149,10 +149,6 @@ type RuntimeContainerHashes struct {
// PlainHash is the hash that directly calculated from pod.spec.container[x]. // PlainHash is the hash that directly calculated from pod.spec.container[x].
// Usually it is calculated by Kubelet and will be in annotation of each runtime container. // Usually it is calculated by Kubelet and will be in annotation of each runtime container.
PlainHash uint64 `json:"plainHash"` PlainHash uint64 `json:"plainHash"`
// PlainHashWithoutResources is the hash that directly calculated from pod.spec.container[x]
// over fields with Resources field zero'd out.
// Usually it is calculated by Kubelet and will be in annotation of each runtime container.
PlainHashWithoutResources uint64 `json:"plainHashWithoutResources"`
// ExtractedEnvFromMetadataHash is the hash that calculated from pod.spec.container[x], // ExtractedEnvFromMetadataHash is the hash that calculated from pod.spec.container[x],
// whose envs from annotations/labels have already been extracted to the real values. // whose envs from annotations/labels have already been extracted to the real values.
ExtractedEnvFromMetadataHash uint64 `json:"extractedEnvFromMetadataHash,omitempty"` ExtractedEnvFromMetadataHash uint64 `json:"extractedEnvFromMetadataHash,omitempty"`

View File

@ -130,6 +130,10 @@ type NodeImageStatus struct {
// +optional // +optional
Pulling int32 `json:"pulling"` Pulling int32 `json:"pulling"`
// The number of pulling tasks which are waiting.
// +optional
Waiting int32 `json:"waiting"`
// all statuses of active image pulling tasks // all statuses of active image pulling tasks
ImageStatuses map[string]ImageStatus `json:"imageStatuses,omitempty"` ImageStatuses map[string]ImageStatus `json:"imageStatuses,omitempty"`

View File

@ -132,9 +132,14 @@ type SidecarContainer struct {
UpgradeStrategy SidecarContainerUpgradeStrategy `json:"upgradeStrategy,omitempty"` UpgradeStrategy SidecarContainerUpgradeStrategy `json:"upgradeStrategy,omitempty"`
// If ShareVolumePolicy is enabled, the sidecar container will share the other container's VolumeMounts // If ShareVolumePolicy is enabled, the sidecar container will share the other container's VolumeMounts
// in the pod(don't contains the injected sidecar container). // in the pod(not including the injected sidecar container).
ShareVolumePolicy ShareVolumePolicy `json:"shareVolumePolicy,omitempty"` ShareVolumePolicy ShareVolumePolicy `json:"shareVolumePolicy,omitempty"`
// If ShareVolumeDevicePolicy is enabled, the sidecar container will share the other container's VolumeDevices
// in the pod(don't contain the injected sidecar container).
// This is a pointer to ensure that the sidecarset-hash does not change if the user does not configure this field, mainly for compatibility with older versions.
ShareVolumeDevicePolicy *ShareVolumePolicy `json:"shareVolumeDevicePolicy,omitempty"`
// TransferEnv will transfer env info from other container // TransferEnv will transfer env info from other container
// SourceContainerName is pod.spec.container[x].name; EnvName is pod.spec.container[x].Env.name // SourceContainerName is pod.spec.container[x].name; EnvName is pod.spec.container[x].Env.name
TransferEnv []TransferEnvVar `json:"transferEnv,omitempty"` TransferEnv []TransferEnvVar `json:"transferEnv,omitempty"`

View File

@ -48,6 +48,8 @@ const (
SubsetUpdated UnitedDeploymentConditionType = "SubsetUpdated" SubsetUpdated UnitedDeploymentConditionType = "SubsetUpdated"
// SubsetFailure is added to a UnitedDeployment when one of its subsets has failure during its own reconciling. // SubsetFailure is added to a UnitedDeployment when one of its subsets has failure during its own reconciling.
SubsetFailure UnitedDeploymentConditionType = "SubsetFailure" SubsetFailure UnitedDeploymentConditionType = "SubsetFailure"
// UnitedDeploymentUpdated means currentRevision is equal to updatedRevision.
UnitedDeploymentUpdated UnitedDeploymentConditionType = "UnitedDeploymentUpdated"
) )
// UnitedDeploymentSpec defines the desired state of UnitedDeployment. // UnitedDeploymentSpec defines the desired state of UnitedDeployment.
@ -250,10 +252,17 @@ type AdaptiveUnitedDeploymentStrategy struct {
// +optional // +optional
RescheduleCriticalSeconds *int32 `json:"rescheduleCriticalSeconds,omitempty"` RescheduleCriticalSeconds *int32 `json:"rescheduleCriticalSeconds,omitempty"`
// UnschedulableLastSeconds is used to set the number of seconds for a Subset to recover from an unschedulable state, // UnschedulableDuration is used to set the number of seconds for a Subset to recover from an unschedulable state,
// with a default value of 300 seconds. // with a default value of 300 seconds.
// +optional // +optional
UnschedulableLastSeconds *int32 `json:"unschedulableLastSeconds,omitempty"` UnschedulableDuration *int32 `json:"unschedulableDuration,omitempty"`
// ReserveUnschedulablePods indicates whether to enable reservation rescheduling mode, which is disabled by default.
// If this feature is enabled, those pending pods that would otherwise be permanently transferred to other subsets
// due to scheduling failure will be retained, and a temporary substitute Pod will be created in another subset to take over its work.
// When the retained pod is successfully scheduled and ready, its temporary substitute will be deleted.
// +optional
ReserveUnschedulablePods bool `json:"reserveUnschedulablePods,omitempty"`
} }
// UnitedDeploymentScheduleStrategy defines the schedule performance of UnitedDeployment. // UnitedDeploymentScheduleStrategy defines the schedule performance of UnitedDeployment.
@ -272,6 +281,10 @@ func (s *UnitedDeploymentScheduleStrategy) IsAdaptive() bool {
return s.Type == AdaptiveUnitedDeploymentScheduleStrategyType return s.Type == AdaptiveUnitedDeploymentScheduleStrategyType
} }
func (s *UnitedDeploymentScheduleStrategy) ShouldReserveUnschedulablePods() bool {
return s.IsAdaptive() && s.Adaptive != nil && s.Adaptive.ReserveUnschedulablePods
}
func (s *UnitedDeploymentScheduleStrategy) GetRescheduleCriticalDuration() time.Duration { func (s *UnitedDeploymentScheduleStrategy) GetRescheduleCriticalDuration() time.Duration {
if s.Adaptive == nil || s.Adaptive.RescheduleCriticalSeconds == nil { if s.Adaptive == nil || s.Adaptive.RescheduleCriticalSeconds == nil {
return DefaultRescheduleCriticalDuration return DefaultRescheduleCriticalDuration
@ -279,11 +292,11 @@ func (s *UnitedDeploymentScheduleStrategy) GetRescheduleCriticalDuration() time.
return time.Duration(*s.Adaptive.RescheduleCriticalSeconds) * time.Second return time.Duration(*s.Adaptive.RescheduleCriticalSeconds) * time.Second
} }
func (s *UnitedDeploymentScheduleStrategy) GetUnschedulableLastDuration() time.Duration { func (s *UnitedDeploymentScheduleStrategy) GetUnschedulableDuration() time.Duration {
if s.Adaptive == nil || s.Adaptive.UnschedulableLastSeconds == nil { if s.Adaptive == nil || s.Adaptive.UnschedulableDuration == nil {
return DefaultUnschedulableStatusLastDuration return DefaultUnschedulableStatusLastDuration
} }
return time.Duration(*s.Adaptive.UnschedulableLastSeconds) * time.Second return time.Duration(*s.Adaptive.UnschedulableDuration) * time.Second
} }
// UnitedDeploymentStatus defines the observed state of UnitedDeployment. // UnitedDeploymentStatus defines the observed state of UnitedDeployment.
@ -303,6 +316,9 @@ type UnitedDeploymentStatus struct {
// The number of pods in current version. // The number of pods in current version.
UpdatedReplicas int32 `json:"updatedReplicas"` UpdatedReplicas int32 `json:"updatedReplicas"`
// The number of reserved pods in temporary adaptive strategy.
ReservedPods int32 `json:"reservedPods,omitempty"`
// The number of ready current revision replicas for this UnitedDeployment. // The number of ready current revision replicas for this UnitedDeployment.
// +optional // +optional
UpdatedReadyReplicas int32 `json:"updatedReadyReplicas,omitempty"` UpdatedReadyReplicas int32 `json:"updatedReadyReplicas,omitempty"`
@ -343,14 +359,6 @@ func (s *UnitedDeploymentStatus) GetSubsetStatus(subset string) *UnitedDeploymen
return nil return nil
} }
func (u *UnitedDeployment) InitSubsetStatuses() {
for _, subset := range u.Spec.Topology.Subsets {
if u.Status.GetSubsetStatus(subset.Name) == nil {
u.Status.SubsetStatuses = append(u.Status.SubsetStatuses, UnitedDeploymentSubsetStatus{Name: subset.Name})
}
}
}
// UnitedDeploymentCondition describes current state of a UnitedDeployment. // UnitedDeploymentCondition describes current state of a UnitedDeployment.
type UnitedDeploymentCondition struct { type UnitedDeploymentCondition struct {
// Type of in place set condition. // Type of in place set condition.
@ -383,10 +391,14 @@ type UpdateStatus struct {
type UnitedDeploymentSubsetStatus struct { type UnitedDeploymentSubsetStatus struct {
// Subset name specified in Topology.Subsets // Subset name specified in Topology.Subsets
Name string `json:"name,omitempty"` Name string `json:"name,omitempty"`
// Recores the current replicas. Currently unused. // Records the current replicas. Currently unused.
Replicas int32 `json:"replicas,omitempty"` Replicas int32 `json:"replicas,omitempty"`
// Records the current ready replicas. Currently unused.
ReadyReplicas int32 `json:"readyReplicas,omitempty"`
// Records the current partition. Currently unused. // Records the current partition. Currently unused.
Partition int32 `json:"partition,omitempty"` Partition int32 `json:"partition,omitempty"`
// Records the reserved pods in the subset.
ReservedPods int32 `json:"reservedPods,omitempty"`
// Conditions is an array of current observed subset conditions. // Conditions is an array of current observed subset conditions.
Conditions []UnitedDeploymentSubsetCondition `json:"conditions,omitempty"` Conditions []UnitedDeploymentSubsetCondition `json:"conditions,omitempty"`
} }

View File

@ -4,6 +4,9 @@ const (
// ControllerRevisionHashLabelKey is used to record the controller revision of current resource. // ControllerRevisionHashLabelKey is used to record the controller revision of current resource.
ControllerRevisionHashLabelKey = "apps.kruise.io/controller-revision-hash" ControllerRevisionHashLabelKey = "apps.kruise.io/controller-revision-hash"
// ReservedPodLabelKey is used to mark the reserved pods.
ReservedPodLabelKey = "apps.kruise.io/united-deployment-reserved-pod"
// SubSetNameLabelKey is used to record the name of current subset. // SubSetNameLabelKey is used to record the name of current subset.
SubSetNameLabelKey = "apps.kruise.io/subset-name" SubSetNameLabelKey = "apps.kruise.io/subset-name"
@ -29,4 +32,7 @@ const (
// using in-place update strategy to kill sidecar. This image must be given if you want to use in-place update // using in-place update strategy to kill sidecar. This image must be given if you want to use in-place update
// strategy to terminate sidecar containers. // strategy to terminate sidecar containers.
KruiseTerminateSidecarWithImageEnv = "KRUISE_TERMINATE_SIDECAR_WHEN_JOB_EXIT_WITH_IMAGE" KruiseTerminateSidecarWithImageEnv = "KRUISE_TERMINATE_SIDECAR_WHEN_JOB_EXIT_WITH_IMAGE"
// KruiseIgnoreContainerExitCodeEnv is an env name, which represents a switch to ignore the exit code of sidecar container.
KruiseIgnoreContainerExitCodeEnv = "KRUISE_TERMINATE_SIDECAR_IGNORE_EXIT_CODE"
) )

View File

@ -38,8 +38,8 @@ func (in *AdaptiveUnitedDeploymentStrategy) DeepCopyInto(out *AdaptiveUnitedDepl
*out = new(int32) *out = new(int32)
**out = **in **out = **in
} }
if in.UnschedulableLastSeconds != nil { if in.UnschedulableDuration != nil {
in, out := &in.UnschedulableLastSeconds, &out.UnschedulableLastSeconds in, out := &in.UnschedulableDuration, &out.UnschedulableDuration
*out = new(int32) *out = new(int32)
**out = **in **out = **in
} }
@ -2711,6 +2711,11 @@ func (in *SidecarContainer) DeepCopyInto(out *SidecarContainer) {
in.Container.DeepCopyInto(&out.Container) in.Container.DeepCopyInto(&out.Container)
out.UpgradeStrategy = in.UpgradeStrategy out.UpgradeStrategy = in.UpgradeStrategy
out.ShareVolumePolicy = in.ShareVolumePolicy out.ShareVolumePolicy = in.ShareVolumePolicy
if in.ShareVolumeDevicePolicy != nil {
in, out := &in.ShareVolumeDevicePolicy, &out.ShareVolumeDevicePolicy
*out = new(ShareVolumePolicy)
**out = **in
}
if in.TransferEnv != nil { if in.TransferEnv != nil {
in, out := &in.TransferEnv, &out.TransferEnv in, out := &in.TransferEnv, &out.TransferEnv
*out = make([]TransferEnvVar, len(*in)) *out = make([]TransferEnvVar, len(*in))

View File

@ -27,14 +27,23 @@ import (
type PubOperation string type PubOperation string
const ( const (
// PubProtectOperationAnnotation indicates the pub protected Operation[DELETE,UPDATE,EVICT] // PubProtectOperationAnnotation indicates the pub protected Operation[DELETE,UPDATE,EVICT].
// if annotations[kruise.io/pub-protect-operations]=EVICT indicates the pub only protect evict pod // if annotations[kruise.io/pub-protect-operations]=EVICT indicates the pub only protect evict pod.
// if the annotations do not exist, the default DELETE,EVICT,UPDATE are protected // if the annotations do not exist, the default DELETE,EVICT,UPDATE are protected.
// RESIZE: Pod vertical scaling action. If it's enabled, all resize action will be protected. RESIZE
// is an extension of UPDATE, if RESIZE is disabled and UPDATE is enabled, any UPDATE operation will
// be protected only as it will definitely cause container restarts.
// UPDATE: Kruise will carefully differentiate whether this update will cause interruptions. When
// the FeatureGate InPlacePodVerticalScaling is enabled, pod inplace vertical scaling will be
// considered non-disruption only when allowedResources(cpu、memory) changes、restartPolicy
// is not restartContainer、is not static pod and QoS not changed. But if featureGate
// InPlacePodVerticalScaling is disabled, all resize action will be considered as disruption.
PubProtectOperationAnnotation = "kruise.io/pub-protect-operations" PubProtectOperationAnnotation = "kruise.io/pub-protect-operations"
// pod webhook operation // pod webhook operation
PubUpdateOperation PubOperation = "UPDATE" PubUpdateOperation PubOperation = "UPDATE"
PubDeleteOperation PubOperation = "DELETE" PubDeleteOperation PubOperation = "DELETE"
PubEvictOperation PubOperation = "EVICT" PubEvictOperation PubOperation = "EVICT"
PubResizeOperation PubOperation = "RESIZE"
// PubProtectTotalReplicasAnnotation is the target replicas. // PubProtectTotalReplicasAnnotation is the target replicas.
// By default, PUB will get the target replicas through workload.spec.replicas. but there are some scenarios that may workload doesn't // By default, PUB will get the target replicas through workload.spec.replicas. but there are some scenarios that may workload doesn't
// implement scale subresources or Pod doesn't have workload management. In this scenario, you can set pub.kruise.io/protect-total-replicas // implement scale subresources or Pod doesn't have workload management. In this scenario, you can set pub.kruise.io/protect-total-replicas

View File

@ -47,6 +47,13 @@ var (
enablePprof = flag.Bool("enable-pprof", true, "Enable pprof for daemon.") enablePprof = flag.Bool("enable-pprof", true, "Enable pprof for daemon.")
pluginConfigFile = flag.String("plugin-config-file", "/kruise/CredentialProviderPlugin.yaml", "The path of plugin config file.") pluginConfigFile = flag.String("plugin-config-file", "/kruise/CredentialProviderPlugin.yaml", "The path of plugin config file.")
pluginBinDir = flag.String("plugin-bin-dir", "/kruise/plugins", "The path of directory of plugin binaries.") pluginBinDir = flag.String("plugin-bin-dir", "/kruise/plugins", "The path of directory of plugin binaries.")
// TODO: After the feature is stable, the default value should also be restricted, e.g. 5.
// Users can set this value to limit the number of workers for pulling images,
// preventing the consumption of all available disk IOPS or network bandwidth,
// which could otherwise impact the performance of other running pods.
maxWorkersForPullImage = flag.Int("max-workers-for-pull-image", -1, "The maximum number of workers for pulling images.")
) )
func main() { func main() {
@ -71,7 +78,7 @@ func main() {
}() }()
} }
ctx := signals.SetupSignalHandler() ctx := signals.SetupSignalHandler()
d, err := daemon.NewDaemon(cfg, *bindAddr) d, err := daemon.NewDaemon(cfg, *bindAddr, *maxWorkersForPullImage)
if err != nil { if err != nil {
klog.Fatalf("Failed to new daemon: %v", err) klog.Fatalf("Failed to new daemon: %v", err)
} }

View File

@ -20,9 +20,10 @@ import (
"context" "context"
"log" "log"
kruiseclientset "github.com/openkruise/kruise/pkg/client/clientset/versioned"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/client-go/rest" "k8s.io/client-go/rest"
kruiseclientset "github.com/openkruise/kruise/pkg/client/clientset/versioned"
) )
func main() { func main() {

View File

@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition kind: CustomResourceDefinition
metadata: metadata:
annotations: annotations:
controller-gen.kubebuilder.io/version: v0.14.0 controller-gen.kubebuilder.io/version: v0.16.5
name: advancedcronjobs.apps.kruise.io name: advancedcronjobs.apps.kruise.io
spec: spec:
group: apps.kruise.io group: apps.kruise.io
@ -202,24 +202,8 @@ spec:
active: active:
description: A list of pointers to currently running jobs. description: A list of pointers to currently running jobs.
items: items:
description: |- description: ObjectReference contains enough information to let
ObjectReference contains enough information to let you inspect or modify the referred object. 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 .
properties: properties:
apiVersion: apiVersion:
description: API version of the referent. description: API version of the referent.
@ -233,7 +217,6 @@ spec:
the event) or if no container name is specified "spec.containers[2]" (container with 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 index 2 in this pod). This syntax is chosen only to have some well-defined way of
referencing a part of an object. referencing a part of an object.
TODO: this design is not final and this field is subject to change in the future.
type: string type: string
kind: kind:
description: |- description: |-

View File

@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition kind: CustomResourceDefinition
metadata: metadata:
annotations: annotations:
controller-gen.kubebuilder.io/version: v0.14.0 controller-gen.kubebuilder.io/version: v0.16.5
name: broadcastjobs.apps.kruise.io name: broadcastjobs.apps.kruise.io
spec: spec:
group: apps.kruise.io group: apps.kruise.io

View File

@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition kind: CustomResourceDefinition
metadata: metadata:
annotations: annotations:
controller-gen.kubebuilder.io/version: v0.14.0 controller-gen.kubebuilder.io/version: v0.16.5
name: clonesets.apps.kruise.io name: clonesets.apps.kruise.io
spec: spec:
group: apps.kruise.io group: apps.kruise.io
@ -238,11 +238,13 @@ spec:
items: items:
type: string type: string
type: array type: array
x-kubernetes-list-type: atomic
required: required:
- key - key
- operator - operator
type: object type: object
type: array type: array
x-kubernetes-list-type: atomic
matchLabels: matchLabels:
additionalProperties: additionalProperties:
type: string type: string
@ -375,11 +377,13 @@ spec:
items: items:
type: string type: string
type: array type: array
x-kubernetes-list-type: atomic
required: required:
- key - key
- operator - operator
type: object type: object
type: array type: array
x-kubernetes-list-type: atomic
matchLabels: matchLabels:
additionalProperties: additionalProperties:
type: string type: string

View File

@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition kind: CustomResourceDefinition
metadata: metadata:
annotations: annotations:
controller-gen.kubebuilder.io/version: v0.14.0 controller-gen.kubebuilder.io/version: v0.16.5
name: containerrecreaterequests.apps.kruise.io name: containerrecreaterequests.apps.kruise.io
spec: spec:
group: apps.kruise.io group: apps.kruise.io
@ -143,6 +143,7 @@ spec:
items: items:
type: string type: string
type: array type: array
x-kubernetes-list-type: atomic
type: object type: object
httpGet: httpGet:
description: HTTPGet specifies the http request to perform. description: HTTPGet specifies the http request to perform.
@ -172,6 +173,7 @@ spec:
- value - value
type: object type: object
type: array type: array
x-kubernetes-list-type: atomic
path: path:
description: Path to access on the HTTP server. description: Path to access on the HTTP server.
type: string type: string
@ -196,7 +198,6 @@ spec:
description: |- description: |-
TCPSocket specifies an action involving a TCP port. TCPSocket specifies an action involving a TCP port.
TCP hooks not yet supported TCP hooks not yet supported
TODO: implement a realistic TCP lifecycle hook
properties: properties:
host: host:
description: 'Optional: Host name to connect to, defaults description: 'Optional: Host name to connect to, defaults

View File

@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition kind: CustomResourceDefinition
metadata: metadata:
annotations: annotations:
controller-gen.kubebuilder.io/version: v0.14.0 controller-gen.kubebuilder.io/version: v0.16.5
name: daemonsets.apps.kruise.io name: daemonsets.apps.kruise.io
spec: spec:
group: apps.kruise.io group: apps.kruise.io
@ -204,11 +204,13 @@ spec:
items: items:
type: string type: string
type: array type: array
x-kubernetes-list-type: atomic
required: required:
- key - key
- operator - operator
type: object type: object
type: array type: array
x-kubernetes-list-type: atomic
matchLabels: matchLabels:
additionalProperties: additionalProperties:
type: string type: string
@ -327,11 +329,13 @@ spec:
items: items:
type: string type: string
type: array type: array
x-kubernetes-list-type: atomic
required: required:
- key - key
- operator - operator
type: object type: object
type: array type: array
x-kubernetes-list-type: atomic
matchLabels: matchLabels:
additionalProperties: additionalProperties:
type: string type: string

View File

@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition kind: CustomResourceDefinition
metadata: metadata:
annotations: annotations:
controller-gen.kubebuilder.io/version: v0.14.0 controller-gen.kubebuilder.io/version: v0.16.5
name: ephemeraljobs.apps.kruise.io name: ephemeraljobs.apps.kruise.io
spec: spec:
group: apps.kruise.io group: apps.kruise.io
@ -127,11 +127,13 @@ spec:
items: items:
type: string type: string
type: array type: array
x-kubernetes-list-type: atomic
required: required:
- key - key
- operator - operator
type: object type: object
type: array type: array
x-kubernetes-list-type: atomic
matchLabels: matchLabels:
additionalProperties: additionalProperties:
type: string type: string

View File

@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition kind: CustomResourceDefinition
metadata: metadata:
annotations: annotations:
controller-gen.kubebuilder.io/version: v0.14.0 controller-gen.kubebuilder.io/version: v0.16.5
name: imagelistpulljobs.apps.kruise.io name: imagelistpulljobs.apps.kruise.io
spec: spec:
group: apps.kruise.io group: apps.kruise.io
@ -140,11 +140,13 @@ spec:
items: items:
type: string type: string
type: array type: array
x-kubernetes-list-type: atomic
required: required:
- key - key
- operator - operator
type: object type: object
type: array type: array
x-kubernetes-list-type: atomic
matchLabels: matchLabels:
additionalProperties: additionalProperties:
type: string type: string
@ -225,11 +227,13 @@ spec:
items: items:
type: string type: string
type: array type: array
x-kubernetes-list-type: atomic
required: required:
- key - key
- operator - operator
type: object type: object
type: array type: array
x-kubernetes-list-type: atomic
matchLabels: matchLabels:
additionalProperties: additionalProperties:
type: string type: string

View File

@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition kind: CustomResourceDefinition
metadata: metadata:
annotations: annotations:
controller-gen.kubebuilder.io/version: v0.14.0 controller-gen.kubebuilder.io/version: v0.16.5
name: imagepulljobs.apps.kruise.io name: imagepulljobs.apps.kruise.io
spec: spec:
group: apps.kruise.io group: apps.kruise.io
@ -146,11 +146,13 @@ spec:
items: items:
type: string type: string
type: array type: array
x-kubernetes-list-type: atomic
required: required:
- key - key
- operator - operator
type: object type: object
type: array type: array
x-kubernetes-list-type: atomic
matchLabels: matchLabels:
additionalProperties: additionalProperties:
type: string type: string
@ -231,11 +233,13 @@ spec:
items: items:
type: string type: string
type: array type: array
x-kubernetes-list-type: atomic
required: required:
- key - key
- operator - operator
type: object type: object
type: array type: array
x-kubernetes-list-type: atomic
matchLabels: matchLabels:
additionalProperties: additionalProperties:
type: string type: string

View File

@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition kind: CustomResourceDefinition
metadata: metadata:
annotations: annotations:
controller-gen.kubebuilder.io/version: v0.14.0 controller-gen.kubebuilder.io/version: v0.16.5
name: nodeimages.apps.kruise.io name: nodeimages.apps.kruise.io
spec: spec:
group: apps.kruise.io group: apps.kruise.io
@ -116,24 +116,8 @@ spec:
List of objects depended by this object. If this image is managed by a controller, List of objects depended by this object. If this image is managed by a controller,
then an entry in this list will point to this controller. then an entry in this list will point to this controller.
items: items:
description: |- description: ObjectReference contains enough information
ObjectReference contains enough information to let you inspect or modify the referred object. 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 .
properties: properties:
apiVersion: apiVersion:
description: API version of the referent. description: API version of the referent.
@ -147,7 +131,6 @@ spec:
the event) or if no container name is specified "spec.containers[2]" (container with 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 index 2 in this pod). This syntax is chosen only to have some well-defined way of
referencing a part of an object. referencing a part of an object.
TODO: this design is not final and this field is subject to change in the future.
type: string type: string
kind: kind:
description: |- description: |-
@ -220,7 +203,6 @@ spec:
concurrency, change detection, and the watch operation on a resource or set of resources. 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. Clients must treat these values as opaque and passed unmodified back to the server.
Populated by the system. Populated by the system.
Read-only. Read-only.
Value must be treated as opaque by clients and . Value must be treated as opaque by clients and .
@ -330,6 +312,10 @@ spec:
description: The number of pulling tasks which reached phase Succeeded. description: The number of pulling tasks which reached phase Succeeded.
format: int32 format: int32
type: integer type: integer
waiting:
description: The number of pulling tasks which are waiting.
format: int32
type: integer
required: required:
- desired - desired
type: object type: object

View File

@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition kind: CustomResourceDefinition
metadata: metadata:
annotations: annotations:
controller-gen.kubebuilder.io/version: v0.14.0 controller-gen.kubebuilder.io/version: v0.16.5
name: nodepodprobes.apps.kruise.io name: nodepodprobes.apps.kruise.io
spec: spec:
group: apps.kruise.io group: apps.kruise.io
@ -66,7 +66,8 @@ spec:
description: container probe spec description: container probe spec
properties: properties:
exec: exec:
description: Exec specifies the action to take. description: Exec specifies a command to execute in
the container.
properties: properties:
command: command:
description: |- description: |-
@ -78,6 +79,7 @@ spec:
items: items:
type: string type: string
type: array type: array
x-kubernetes-list-type: atomic
type: object type: object
failureThreshold: failureThreshold:
description: |- description: |-
@ -86,8 +88,7 @@ spec:
format: int32 format: int32
type: integer type: integer
grpc: grpc:
description: GRPC specifies an action involving a description: GRPC specifies a GRPC HealthCheckRequest.
GRPC port.
properties: properties:
port: port:
description: Port number of the gRPC service. description: Port number of the gRPC service.
@ -95,19 +96,19 @@ spec:
format: int32 format: int32
type: integer type: integer
service: service:
default: ""
description: |- description: |-
Service is the name of the service to place in the gRPC HealthCheckRequest 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). (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md).
If this is not specified, the default behavior is defined by gRPC. If this is not specified, the default behavior is defined by gRPC.
type: string type: string
required: required:
- port - port
type: object type: object
httpGet: httpGet:
description: HTTPGet specifies the http request to description: HTTPGet specifies an HTTP GET request
perform. to perform.
properties: properties:
host: host:
description: |- description: |-
@ -134,6 +135,7 @@ spec:
- value - value
type: object type: object
type: array type: array
x-kubernetes-list-type: atomic
path: path:
description: Path to access on the HTTP server. description: Path to access on the HTTP server.
type: string type: string
@ -173,8 +175,8 @@ spec:
format: int32 format: int32
type: integer type: integer
tcpSocket: tcpSocket:
description: TCPSocket specifies an action involving description: TCPSocket specifies a connection to a
a TCP port. TCP port.
properties: properties:
host: host:
description: 'Optional: Host name to connect to, description: 'Optional: Host name to connect to,

View File

@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition kind: CustomResourceDefinition
metadata: metadata:
annotations: annotations:
controller-gen.kubebuilder.io/version: v0.14.0 controller-gen.kubebuilder.io/version: v0.16.5
name: persistentpodstates.apps.kruise.io name: persistentpodstates.apps.kruise.io
spec: spec:
group: apps.kruise.io group: apps.kruise.io

View File

@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition kind: CustomResourceDefinition
metadata: metadata:
annotations: annotations:
controller-gen.kubebuilder.io/version: v0.14.0 controller-gen.kubebuilder.io/version: v0.16.5
name: podprobemarkers.apps.kruise.io name: podprobemarkers.apps.kruise.io
spec: spec:
group: apps.kruise.io group: apps.kruise.io
@ -93,7 +93,8 @@ spec:
description: container probe spec description: container probe spec
properties: properties:
exec: exec:
description: Exec specifies the action to take. description: Exec specifies a command to execute in the
container.
properties: properties:
command: command:
description: |- description: |-
@ -105,6 +106,7 @@ spec:
items: items:
type: string type: string
type: array type: array
x-kubernetes-list-type: atomic
type: object type: object
failureThreshold: failureThreshold:
description: |- description: |-
@ -113,7 +115,7 @@ spec:
format: int32 format: int32
type: integer type: integer
grpc: grpc:
description: GRPC specifies an action involving a GRPC port. description: GRPC specifies a GRPC HealthCheckRequest.
properties: properties:
port: port:
description: Port number of the gRPC service. Number description: Port number of the gRPC service. Number
@ -121,18 +123,18 @@ spec:
format: int32 format: int32
type: integer type: integer
service: service:
default: ""
description: |- description: |-
Service is the name of the service to place in the gRPC HealthCheckRequest 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). (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md).
If this is not specified, the default behavior is defined by gRPC. If this is not specified, the default behavior is defined by gRPC.
type: string type: string
required: required:
- port - port
type: object type: object
httpGet: httpGet:
description: HTTPGet specifies the http request to perform. description: HTTPGet specifies an HTTP GET request to perform.
properties: properties:
host: host:
description: |- description: |-
@ -159,6 +161,7 @@ spec:
- value - value
type: object type: object
type: array type: array
x-kubernetes-list-type: atomic
path: path:
description: Path to access on the HTTP server. description: Path to access on the HTTP server.
type: string type: string
@ -198,8 +201,7 @@ spec:
format: int32 format: int32
type: integer type: integer
tcpSocket: tcpSocket:
description: TCPSocket specifies an action involving a TCP description: TCPSocket specifies a connection to a TCP port.
port.
properties: properties:
host: host:
description: 'Optional: Host name to connect to, defaults description: 'Optional: Host name to connect to, defaults
@ -277,11 +279,13 @@ spec:
items: items:
type: string type: string
type: array type: array
x-kubernetes-list-type: atomic
required: required:
- key - key
- operator - operator
type: object type: object
type: array type: array
x-kubernetes-list-type: atomic
matchLabels: matchLabels:
additionalProperties: additionalProperties:
type: string type: string

View File

@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition kind: CustomResourceDefinition
metadata: metadata:
annotations: annotations:
controller-gen.kubebuilder.io/version: v0.14.0 controller-gen.kubebuilder.io/version: v0.16.5
name: resourcedistributions.apps.kruise.io name: resourcedistributions.apps.kruise.io
spec: spec:
group: apps.kruise.io group: apps.kruise.io
@ -131,11 +131,13 @@ spec:
items: items:
type: string type: string
type: array type: array
x-kubernetes-list-type: atomic
required: required:
- key - key
- operator - operator
type: object type: object
type: array type: array
x-kubernetes-list-type: atomic
matchLabels: matchLabels:
additionalProperties: additionalProperties:
type: string type: string

View File

@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition kind: CustomResourceDefinition
metadata: metadata:
annotations: annotations:
controller-gen.kubebuilder.io/version: v0.14.0 controller-gen.kubebuilder.io/version: v0.16.5
name: sidecarsets.apps.kruise.io name: sidecarsets.apps.kruise.io
spec: spec:
group: apps.kruise.io group: apps.kruise.io
@ -73,10 +73,19 @@ spec:
otherwise it will be injected into the back. otherwise it will be injected into the back.
default BeforeAppContainerType default BeforeAppContainerType
type: string type: string
shareVolumeDevicePolicy:
description: |-
If ShareVolumeDevicePolicy is enabled, the sidecar container will share the other container's VolumeDevices
in the pod(don't contain the injected sidecar container).
This is a pointer to ensure that the sidecarset-hash does not change if the user does not configure this field, mainly for compatibility with older versions.
properties:
type:
type: string
type: object
shareVolumePolicy: shareVolumePolicy:
description: |- description: |-
If ShareVolumePolicy is enabled, the sidecar container will share the other container's VolumeMounts If ShareVolumePolicy is enabled, the sidecar container will share the other container's VolumeMounts
in the pod(don't contains the injected sidecar container). in the pod(not including the injected sidecar container).
properties: properties:
type: type:
type: string type: string
@ -146,10 +155,13 @@ spec:
referenced object inside the same namespace. referenced object inside the same namespace.
properties: properties:
name: name:
default: ""
description: |- description: |-
Name of the referent. 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 More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
TODO: Add other useful fields. apiVersion, kind, uid?
type: string type: string
type: object type: object
x-kubernetes-map-type: atomic x-kubernetes-map-type: atomic
@ -170,10 +182,19 @@ spec:
otherwise it will be injected into the back. otherwise it will be injected into the back.
default BeforeAppContainerType default BeforeAppContainerType
type: string type: string
shareVolumeDevicePolicy:
description: |-
If ShareVolumeDevicePolicy is enabled, the sidecar container will share the other container's VolumeDevices
in the pod(don't contain the injected sidecar container).
This is a pointer to ensure that the sidecarset-hash does not change if the user does not configure this field, mainly for compatibility with older versions.
properties:
type:
type: string
type: object
shareVolumePolicy: shareVolumePolicy:
description: |- description: |-
If ShareVolumePolicy is enabled, the sidecar container will share the other container's VolumeMounts If ShareVolumePolicy is enabled, the sidecar container will share the other container's VolumeMounts
in the pod(don't contains the injected sidecar container). in the pod(not including the injected sidecar container).
properties: properties:
type: type:
type: string type: string
@ -306,11 +327,13 @@ spec:
items: items:
type: string type: string
type: array type: array
x-kubernetes-list-type: atomic
required: required:
- key - key
- operator - operator
type: object type: object
type: array type: array
x-kubernetes-list-type: atomic
matchLabels: matchLabels:
additionalProperties: additionalProperties:
type: string type: string
@ -373,11 +396,13 @@ spec:
items: items:
type: string type: string
type: array type: array
x-kubernetes-list-type: atomic
required: required:
- key - key
- operator - operator
type: object type: object
type: array type: array
x-kubernetes-list-type: atomic
matchLabels: matchLabels:
additionalProperties: additionalProperties:
type: string type: string
@ -484,11 +509,13 @@ spec:
items: items:
type: string type: string
type: array type: array
x-kubernetes-list-type: atomic
required: required:
- key - key
- operator - operator
type: object type: object
type: array type: array
x-kubernetes-list-type: atomic
matchLabels: matchLabels:
additionalProperties: additionalProperties:
type: string type: string
@ -531,7 +558,6 @@ spec:
description: |- description: |-
If selector is not nil, this upgrade will only update the selected pods. If selector is not nil, this upgrade will only update the selected pods.
Starting from Kruise 1.8.0, the updateStrategy.Selector affects the version of the Sidecar container Starting from Kruise 1.8.0, the updateStrategy.Selector affects the version of the Sidecar container
injected into newly created Pods by a SidecarSet configured with an injectionStrategy. injected into newly created Pods by a SidecarSet configured with an injectionStrategy.
In most cases, all newly created Pods are injected with the specified Sidecar version as configured in injectionStrategy.revision, In most cases, all newly created Pods are injected with the specified Sidecar version as configured in injectionStrategy.revision,
@ -563,11 +589,13 @@ spec:
items: items:
type: string type: string
type: array type: array
x-kubernetes-list-type: atomic
required: required:
- key - key
- operator - operator
type: object type: object
type: array type: array
x-kubernetes-list-type: atomic
matchLabels: matchLabels:
additionalProperties: additionalProperties:
type: string type: string

View File

@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition kind: CustomResourceDefinition
metadata: metadata:
annotations: annotations:
controller-gen.kubebuilder.io/version: v0.14.0 controller-gen.kubebuilder.io/version: v0.16.5
name: statefulsets.apps.kruise.io name: statefulsets.apps.kruise.io
spec: spec:
group: apps.kruise.io group: apps.kruise.io
@ -93,7 +93,6 @@ spec:
These are replicas in the sense that they are instantiations of the These are replicas in the sense that they are instantiations of the
same Template, but individual replicas also have a consistent identity. same Template, but individual replicas also have a consistent identity.
If unspecified, defaults to 1. If unspecified, defaults to 1.
TODO: Consider a rename of this field.
format: int32 format: int32
type: integer type: integer
revisionHistoryLimit: revisionHistoryLimit:
@ -136,11 +135,13 @@ spec:
items: items:
type: string type: string
type: array type: array
x-kubernetes-list-type: atomic
required: required:
- key - key
- operator - operator
type: object type: object
type: array type: array
x-kubernetes-list-type: atomic
matchLabels: matchLabels:
additionalProperties: additionalProperties:
type: string type: string
@ -301,11 +302,13 @@ spec:
items: items:
type: string type: string
type: array type: array
x-kubernetes-list-type: atomic
required: required:
- key - key
- operator - operator
type: object type: object
type: array type: array
x-kubernetes-list-type: atomic
matchLabels: matchLabels:
additionalProperties: additionalProperties:
type: string type: string
@ -344,7 +347,6 @@ spec:
this list must have at least one matching (by name) volumeMount in one 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 container in the template. A claim in this list takes precedence over
any volumes in the template, with the same name. any volumes in the template, with the same name.
TODO: Define the behavior if a claim already exists with the same name.
x-kubernetes-preserve-unknown-fields: true x-kubernetes-preserve-unknown-fields: true
required: required:
- selector - selector
@ -640,7 +642,6 @@ spec:
These are replicas in the sense that they are instantiations of the These are replicas in the sense that they are instantiations of the
same Template, but individual replicas also have a consistent identity. same Template, but individual replicas also have a consistent identity.
If unspecified, defaults to 1. If unspecified, defaults to 1.
TODO: Consider a rename of this field.
format: int32 format: int32
type: integer type: integer
reserveOrdinals: reserveOrdinals:
@ -715,11 +716,13 @@ spec:
items: items:
type: string type: string
type: array type: array
x-kubernetes-list-type: atomic
required: required:
- key - key
- operator - operator
type: object type: object
type: array type: array
x-kubernetes-list-type: atomic
matchLabels: matchLabels:
additionalProperties: additionalProperties:
type: string type: string
@ -878,11 +881,13 @@ spec:
items: items:
type: string type: string
type: array type: array
x-kubernetes-list-type: atomic
required: required:
- key - key
- operator - operator
type: object type: object
type: array type: array
x-kubernetes-list-type: atomic
matchLabels: matchLabels:
additionalProperties: additionalProperties:
type: string type: string
@ -921,7 +926,6 @@ spec:
this list must have at least one matching (by name) volumeMount in one 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 container in the template. A claim in this list takes precedence over
any volumes in the template, with the same name. any volumes in the template, with the same name.
TODO: Define the behavior if a claim already exists with the same name.
x-kubernetes-preserve-unknown-fields: true x-kubernetes-preserve-unknown-fields: true
volumeClaimUpdateStrategy: volumeClaimUpdateStrategy:
description: |- description: |-

View File

@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition kind: CustomResourceDefinition
metadata: metadata:
annotations: annotations:
controller-gen.kubebuilder.io/version: v0.14.0 controller-gen.kubebuilder.io/version: v0.16.5
name: uniteddeployments.apps.kruise.io name: uniteddeployments.apps.kruise.io
spec: spec:
group: apps.kruise.io group: apps.kruise.io
@ -108,11 +108,13 @@ spec:
items: items:
type: string type: string
type: array type: array
x-kubernetes-list-type: atomic
required: required:
- key - key
- operator - operator
type: object type: object
type: array type: array
x-kubernetes-list-type: atomic
matchLabels: matchLabels:
additionalProperties: additionalProperties:
type: string type: string
@ -263,7 +265,6 @@ spec:
These are replicas in the sense that they are instantiations of the These are replicas in the sense that they are instantiations of the
same Template, but individual replicas also have a consistent identity. same Template, but individual replicas also have a consistent identity.
If unspecified, defaults to 1. If unspecified, defaults to 1.
TODO: Consider a rename of this field.
format: int32 format: int32
type: integer type: integer
reserveOrdinals: reserveOrdinals:
@ -338,11 +339,13 @@ spec:
items: items:
type: string type: string
type: array type: array
x-kubernetes-list-type: atomic
required: required:
- key - key
- operator - operator
type: object type: object
type: array type: array
x-kubernetes-list-type: atomic
matchLabels: matchLabels:
additionalProperties: additionalProperties:
type: string type: string
@ -504,11 +507,13 @@ spec:
items: items:
type: string type: string
type: array type: array
x-kubernetes-list-type: atomic
required: required:
- key - key
- operator - operator
type: object type: object
type: array type: array
x-kubernetes-list-type: atomic
matchLabels: matchLabels:
additionalProperties: additionalProperties:
type: string type: string
@ -547,7 +552,6 @@ spec:
this list must have at least one matching (by name) volumeMount in one 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 container in the template. A claim in this list takes precedence over
any volumes in the template, with the same name. any volumes in the template, with the same name.
TODO: Define the behavior if a claim already exists with the same name.
x-kubernetes-preserve-unknown-fields: true x-kubernetes-preserve-unknown-fields: true
volumeClaimUpdateStrategy: volumeClaimUpdateStrategy:
description: |- description: |-
@ -728,11 +732,13 @@ spec:
items: items:
type: string type: string
type: array type: array
x-kubernetes-list-type: atomic
required: required:
- key - key
- operator - operator
type: object type: object
type: array type: array
x-kubernetes-list-type: atomic
matchLabels: matchLabels:
additionalProperties: additionalProperties:
type: string type: string
@ -870,11 +876,13 @@ spec:
items: items:
type: string type: string
type: array type: array
x-kubernetes-list-type: atomic
required: required:
- key - key
- operator - operator
type: object type: object
type: array type: array
x-kubernetes-list-type: atomic
matchLabels: matchLabels:
additionalProperties: additionalProperties:
type: string type: string
@ -972,9 +980,16 @@ spec:
over RescheduleCriticalSeconds duration, the controller will reschedule it to a suitable subset. Default is 30 seconds. over RescheduleCriticalSeconds duration, the controller will reschedule it to a suitable subset. Default is 30 seconds.
format: int32 format: int32
type: integer type: integer
unschedulableLastSeconds: reserveUnschedulablePods:
description: |- description: |-
UnschedulableLastSeconds is used to set the number of seconds for a Subset to recover from an unschedulable state, ReserveUnschedulablePods indicates whether to enable reservation rescheduling mode, which is disabled by default.
If this feature is enabled, those pending pods that would otherwise be permanently transferred to other subsets
due to scheduling failure will be retained, and a temporary substitute Pod will be created in another subset to take over its work.
When the retained pod is successfully scheduled and ready, its temporary substitute will be deleted.
type: boolean
unschedulableDuration:
description: |-
UnschedulableDuration is used to set the number of seconds for a Subset to recover from an unschedulable state,
with a default value of 300 seconds. with a default value of 300 seconds.
format: int32 format: int32
type: integer type: integer
@ -1057,11 +1072,13 @@ spec:
items: items:
type: string type: string
type: array type: array
x-kubernetes-list-type: atomic
required: required:
- key - key
- operator - operator
type: object type: object
type: array type: array
x-kubernetes-list-type: atomic
matchFields: matchFields:
description: A list of node selector requirements by description: A list of node selector requirements by
node's fields. node's fields.
@ -1089,11 +1106,13 @@ spec:
items: items:
type: string type: string
type: array type: array
x-kubernetes-list-type: atomic
required: required:
- key - key
- operator - operator
type: object type: object
type: array type: array
x-kubernetes-list-type: atomic
type: object type: object
x-kubernetes-map-type: atomic x-kubernetes-map-type: atomic
patch: patch:
@ -1243,6 +1262,10 @@ spec:
description: Replicas is the most recently observed number of replicas. description: Replicas is the most recently observed number of replicas.
format: int32 format: int32
type: integer type: integer
reservedPods:
description: The number of reserved pods in temporary adaptive strategy.
format: int32
type: integer
subsetReplicas: subsetReplicas:
additionalProperties: additionalProperties:
format: int32 format: int32
@ -1282,8 +1305,16 @@ spec:
description: Records the current partition. Currently unused. description: Records the current partition. Currently unused.
format: int32 format: int32
type: integer type: integer
readyReplicas:
description: Records the current ready replicas. Currently unused.
format: int32
type: integer
replicas: replicas:
description: Recores the current replicas. Currently unused. description: Records the current replicas. Currently unused.
format: int32
type: integer
reservedPods:
description: Records the reserved pods in the subset.
format: int32 format: int32
type: integer type: integer
type: object type: object

View File

@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition kind: CustomResourceDefinition
metadata: metadata:
annotations: annotations:
controller-gen.kubebuilder.io/version: v0.14.0 controller-gen.kubebuilder.io/version: v0.16.5
name: workloadspreads.apps.kruise.io name: workloadspreads.apps.kruise.io
spec: spec:
group: apps.kruise.io group: apps.kruise.io
@ -147,11 +147,13 @@ spec:
items: items:
type: string type: string
type: array type: array
x-kubernetes-list-type: atomic
required: required:
- key - key
- operator - operator
type: object type: object
type: array type: array
x-kubernetes-list-type: atomic
matchFields: matchFields:
description: A list of node selector requirements description: A list of node selector requirements
by node's fields. by node's fields.
@ -179,11 +181,13 @@ spec:
items: items:
type: string type: string
type: array type: array
x-kubernetes-list-type: atomic
required: required:
- key - key
- operator - operator
type: object type: object
type: array type: array
x-kubernetes-list-type: atomic
type: object type: object
x-kubernetes-map-type: atomic x-kubernetes-map-type: atomic
weight: weight:
@ -227,11 +231,13 @@ spec:
items: items:
type: string type: string
type: array type: array
x-kubernetes-list-type: atomic
required: required:
- key - key
- operator - operator
type: object type: object
type: array type: array
x-kubernetes-list-type: atomic
matchFields: matchFields:
description: A list of node selector requirements by node's description: A list of node selector requirements by node's
fields. fields.
@ -259,11 +265,13 @@ spec:
items: items:
type: string type: string
type: array type: array
x-kubernetes-list-type: atomic
required: required:
- key - key
- operator - operator
type: object type: object
type: array type: array
x-kubernetes-list-type: atomic
type: object type: object
x-kubernetes-map-type: atomic x-kubernetes-map-type: atomic
tolerations: tolerations:
@ -322,7 +330,6 @@ spec:
the target workload after filtering. If this list is not empty, WorkloadSpread will look for the corresponding the target workload after filtering. If this list is not empty, WorkloadSpread will look for the corresponding
values in the target resource according to each path, and treat the sum of these values as the total number of replicas after filtering. values in the target resource according to each path, and treat the sum of these values as the total number of replicas after filtering.
The replicas path is a dot-separated path, similar to "spec.replicas". If there are arrays, you can use numbers to denote indexes, like "subsets.1.replicas". The replicas path is a dot-separated path, similar to "spec.replicas". If there are arrays, you can use numbers to denote indexes, like "subsets.1.replicas".
The real values of these paths must be integers. The real values of these paths must be integers.
items: items:
@ -357,11 +364,13 @@ spec:
items: items:
type: string type: string
type: array type: array
x-kubernetes-list-type: atomic
required: required:
- key - key
- operator - operator
type: object type: object
type: array type: array
x-kubernetes-list-type: atomic
matchLabels: matchLabels:
additionalProperties: additionalProperties:
type: string type: string

View File

@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition kind: CustomResourceDefinition
metadata: metadata:
annotations: annotations:
controller-gen.kubebuilder.io/version: v0.14.0 controller-gen.kubebuilder.io/version: v0.16.5
name: podunavailablebudgets.policy.kruise.io name: podunavailablebudgets.policy.kruise.io
spec: spec:
group: policy.kruise.io group: policy.kruise.io
@ -106,11 +106,13 @@ spec:
items: items:
type: string type: string
type: array type: array
x-kubernetes-list-type: atomic
required: required:
- key - key
- operator - operator
type: object type: object
type: array type: array
x-kubernetes-list-type: atomic
matchLabels: matchLabels:
additionalProperties: additionalProperties:
type: string type: string

View File

@ -103,6 +103,7 @@ spec:
- --logtostderr=true - --logtostderr=true
- -v=5 - -v=5
- --feature-gates=AllAlpha=true,AllBeta=true - --feature-gates=AllAlpha=true,AllBeta=true
- --max-workers-for-pull-image=2
image: controller:latest image: controller:latest
imagePullPolicy: Always imagePullPolicy: Always
securityContext: securityContext:

View File

@ -33,6 +33,7 @@ rules:
resources: resources:
- pods/ephemeralcontainers - pods/ephemeralcontainers
- pods/status - pods/status
- pods/resize
verbs: verbs:
- get - get
- patch - patch

View File

@ -5,11 +5,11 @@ like StatefulSet, Deployment, DaemonSet for instances. While at the same time, m
express more and more diverse requirements for workload upgrade and deployment, which express more and more diverse requirements for workload upgrade and deployment, which
in many cases, cannot be satisfied by the default workload controllers. in many cases, cannot be satisfied by the default workload controllers.
Kruise attempts to fill such gap by offering a set of controllers as the supplement Kruise attempts to fill such a gap by offering a set of controllers as the supplement
to manage new workloads in Kubernetes. The target use cases are representative, to manage new workloads in Kubernetes. The target use cases are representative,
originally collected from the users of Alibaba cloud container services and the originally collected from the users of Alibaba cloud container services and the
developers of the in-house large scale on-line/off-line container applications. developers of the in-house large scale on-line/off-line container applications.
Most of the use cases can be easily applied to other similar cloud user scenarios. Most of the use cases can be easily applied to other similar scenarios for cloud users.
Currently, Kruise supports the following workloads. Currently, Kruise supports the following workloads.

View File

@ -24,7 +24,7 @@ superseded-by:
<!-- BEGIN Remove before PR --> <!-- BEGIN Remove before PR -->
To get started with this template: To get started with this template:
1. **Make a copy of this template.** 1. **Make a copy of this template.**
Copy this template into `docs/enhacements` and name it `YYYYMMDD-my-title.md`, where `YYYYMMDD` is the date the proposal was first drafted. Copy this template into `docs/proposals` and name it `YYYYMMDD-my-title.md`, where `YYYYMMDD` is the date the proposal was first drafted.
1. **Fill out the required sections.** 1. **Fill out the required sections.**
1. **Create a PR.** 1. **Create a PR.**
Aim for single topic PRs to keep discussions focused. Aim for single topic PRs to keep discussions focused.
@ -188,4 +188,3 @@ Consider the following in developing an upgrade strategy for this enhancement:
- [ ] MM/DD/YYYY: First round of feedback from community - [ ] MM/DD/YYYY: First round of feedback from community
- [ ] MM/DD/YYYY: Present proposal at a [community meeting] - [ ] MM/DD/YYYY: Present proposal at a [community meeting]
- [ ] MM/DD/YYYY: Open proposal PR - [ ] MM/DD/YYYY: Open proposal PR

View File

@ -1,9 +1,9 @@
# Notice of Embargo # Notice of Embargo
This is an embargoed notification that a vulnerability has been discovered in This is an embargoed notification that a vulnerability has been discovered in
<!-- TODO: $PROJECT -->. This notice has been sent to subscribed distributors and service OpenKruise/Kruise. This notice has been sent to subscribed distributors and service
providers in order to allow for timely patching. You are receiving this providers in order to allow for timely patching. You are receiving this
notification as you have agreed to abide by the embargo policy (<!-- TODO: $LINK -->) on this notification as you have agreed to abide by the embargo policy (https://github.com/openkruise/kruise/security/policy) on this
project. Do not forward this information to other parties without complying with project. Do not forward this information to other parties without complying with
the instructions of the embargo policy. the instructions of the embargo policy.
@ -57,4 +57,4 @@ when it will be available or links to where the patch will be available.*
* issue public patches before the disclosure date * issue public patches before the disclosure date
This list will be notified immediately if the disclosure date is at risk or This list will be notified immediately if the disclosure date is at risk or
changes. Questions should be directed to the security contacts <!-- TODO: $LINK -->. changes. Questions should be directed to the security contacts at kubernetes-security@service.aliyun.com.

234
go.mod
View File

@ -1,177 +1,181 @@
module github.com/openkruise/kruise module github.com/openkruise/kruise
go 1.22.0 go 1.23.0
require ( require (
github.com/AdaLogics/go-fuzz-headers v0.0.0-20240806141605-e8a1dd7889d6
github.com/appscode/jsonpatch v1.0.1 github.com/appscode/jsonpatch v1.0.1
github.com/coreos/go-semver v0.3.1
github.com/docker/distribution v2.8.2+incompatible github.com/docker/distribution v2.8.2+incompatible
github.com/evanphx/json-patch v5.6.0+incompatible github.com/evanphx/json-patch v5.6.0+incompatible
github.com/fsnotify/fsnotify v1.7.0 github.com/fsnotify/fsnotify v1.7.0
github.com/go-bindata/go-bindata v3.1.2+incompatible github.com/go-bindata/go-bindata v3.1.2+incompatible
github.com/onsi/ginkgo v1.16.5 github.com/onsi/ginkgo v1.16.5
github.com/onsi/gomega v1.33.0 github.com/onsi/ginkgo/v2 v2.23.4
github.com/prometheus/client_golang v1.16.0 github.com/onsi/gomega v1.36.3
github.com/prometheus/client_golang v1.19.1
github.com/robfig/cron/v3 v3.0.1 github.com/robfig/cron/v3 v3.0.1
github.com/spf13/cobra v1.8.0 github.com/spf13/cobra v1.8.1
github.com/spf13/pflag v1.0.5 github.com/spf13/pflag v1.0.5
github.com/stretchr/testify v1.9.0 github.com/stretchr/testify v1.9.0
golang.org/x/time v0.3.0 golang.org/x/time v0.7.0
gomodules.xyz/jsonpatch/v2 v2.4.0 gomodules.xyz/jsonpatch/v2 v2.4.0
google.golang.org/grpc v1.63.0 google.golang.org/grpc v1.65.0
k8s.io/api v0.30.9 k8s.io/api v0.32.6
k8s.io/apiextensions-apiserver v0.30.9 k8s.io/apiextensions-apiserver v0.32.6
k8s.io/apimachinery v0.30.9 k8s.io/apimachinery v0.32.6
k8s.io/apiserver v0.30.9 k8s.io/apiserver v0.32.6
k8s.io/client-go v0.30.9 k8s.io/client-go v0.32.6
k8s.io/code-generator v0.30.9 k8s.io/code-generator v0.32.6
k8s.io/component-base v0.30.9 k8s.io/component-base v0.32.6
k8s.io/component-helpers v0.30.9 k8s.io/component-helpers v0.32.6
k8s.io/cri-api v0.30.9 k8s.io/cri-api v0.32.6
k8s.io/cri-client v0.32.6
k8s.io/gengo v0.0.0-20230829151522-9cce18d56c01 k8s.io/gengo v0.0.0-20230829151522-9cce18d56c01
k8s.io/klog/v2 v2.120.1 k8s.io/klog/v2 v2.130.1
k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 k8s.io/kube-openapi v0.0.0-20241105132330-32ad38e42d3f
k8s.io/kubelet v0.30.9 k8s.io/kubelet v0.32.6
k8s.io/kubernetes v1.30.9 k8s.io/kubernetes v1.32.6
k8s.io/utils v0.0.0-20230726121419-3b25d923346b k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738
sigs.k8s.io/controller-runtime v0.18.6 sigs.k8s.io/controller-runtime v0.20.2
) )
require ( require (
cel.dev/expr v0.18.0 // indirect
github.com/NYTimes/gziphandler v1.1.1 // indirect github.com/NYTimes/gziphandler v1.1.1 // indirect
github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230305170008-8188dc5388df // indirect github.com/antlr4-go/antlr/v4 v4.13.0 // indirect
github.com/coreos/go-semver v0.3.1 // indirect
github.com/coreos/go-systemd/v22 v22.5.0 // indirect github.com/coreos/go-systemd/v22 v22.5.0 // indirect
github.com/distribution/reference v0.5.0 // indirect github.com/distribution/reference v0.6.0 // indirect
github.com/fxamacker/cbor/v2 v2.7.0 // indirect
github.com/go-logr/zapr v1.3.0 // indirect github.com/go-logr/zapr v1.3.0 // indirect
github.com/google/cel-go v0.17.8 // indirect github.com/go-task/slim-sprig/v3 v3.0.0 // indirect
github.com/google/btree v1.1.3 // indirect
github.com/google/cel-go v0.22.0 // indirect
github.com/google/gnostic-models v0.6.8 // indirect github.com/google/gnostic-models v0.6.8 // indirect
github.com/google/pprof v0.0.0-20250403155104-27863c87afa6 // indirect
github.com/gorilla/websocket v1.5.0 // indirect github.com/gorilla/websocket v1.5.0 // indirect
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 // indirect github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/moby/sys/userns v0.1.0 // indirect
github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f // indirect github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f // indirect
github.com/stoewer/go-strcase v1.2.0 // indirect github.com/stoewer/go-strcase v1.3.0 // indirect
go.etcd.io/etcd/api/v3 v3.5.10 // indirect github.com/x448/float16 v0.8.4 // indirect
go.etcd.io/etcd/client/pkg/v3 v3.5.10 // indirect go.etcd.io/etcd/api/v3 v3.5.16 // indirect
go.etcd.io/etcd/client/v3 v3.5.10 // indirect go.etcd.io/etcd/client/pkg/v3 v3.5.16 // indirect
go.etcd.io/etcd/client/v3 v3.5.16 // indirect
go.uber.org/automaxprocs v1.6.0 // indirect
go.uber.org/multierr v1.11.0 // indirect go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.26.0 // indirect go.uber.org/zap v1.27.0 // indirect
golang.org/x/crypto v0.31.0 // indirect golang.org/x/crypto v0.36.0 // indirect
golang.org/x/exp v0.0.0-20230224173230-c95f2b4c22f2 // indirect golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 // indirect
golang.org/x/net v0.33.0 // indirect golang.org/x/net v0.38.0 // indirect
google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de // indirect google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de // indirect
gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect
gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect
k8s.io/controller-manager v0.30.9 // indirect k8s.io/controller-manager v0.32.6 // indirect
k8s.io/gengo/v2 v2.0.0-20240228010128-51d4e06bde70 // indirect k8s.io/gengo/v2 v2.0.0-20240911193312-2b36238f13e9 // indirect
k8s.io/kms v0.30.9 // indirect k8s.io/kms v0.32.6 // indirect
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.29.0 // indirect sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.31.0 // indirect
) )
require ( require (
github.com/Microsoft/go-winio v0.6.1 // indirect github.com/Microsoft/go-winio v0.6.2 // indirect
github.com/asaskevich/govalidator v0.0.0-20200907205600-7a23bdc65eef // indirect github.com/asaskevich/govalidator v0.0.0-20200907205600-7a23bdc65eef // indirect
github.com/beorn7/perks v1.0.1 // indirect github.com/beorn7/perks v1.0.1 // indirect
github.com/blang/semver/v4 v4.0.0 // indirect github.com/blang/semver/v4 v4.0.0 // indirect
github.com/cenkalti/backoff/v4 v4.3.0 // indirect github.com/cenkalti/backoff/v4 v4.3.0 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/cyphar/filepath-securejoin v0.2.4 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/emicklei/go-restful/v3 v3.11.0 // indirect github.com/emicklei/go-restful/v3 v3.11.0 // indirect
github.com/evanphx/json-patch/v5 v5.9.0 // indirect github.com/evanphx/json-patch/v5 v5.9.11 // indirect
github.com/felixge/httpsnoop v1.0.4 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect
github.com/go-logr/logr v1.4.2 // indirect github.com/go-logr/logr v1.4.2 // indirect
github.com/go-logr/stdr v1.2.2 // indirect github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-openapi/jsonpointer v0.19.6 // indirect github.com/go-openapi/jsonpointer v0.21.0 // indirect
github.com/go-openapi/jsonreference v0.20.2 // indirect github.com/go-openapi/jsonreference v0.20.2 // indirect
github.com/go-openapi/swag v0.22.3 // indirect github.com/go-openapi/swag v0.23.0 // indirect
github.com/gogo/protobuf v1.3.2 // indirect github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.4 // indirect github.com/golang/protobuf v1.5.4 // indirect
github.com/google/go-cmp v0.6.0 github.com/google/go-cmp v0.7.0
github.com/google/gofuzz v1.2.0 // indirect github.com/google/gofuzz v1.2.0 // indirect
github.com/google/uuid v1.6.0 // indirect github.com/google/uuid v1.6.0 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0 // indirect github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 // indirect
github.com/imdario/mergo v0.3.12 // indirect
github.com/josharian/intern v1.0.0 // indirect github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect github.com/json-iterator/go v1.1.12 // indirect
github.com/mailru/easyjson v0.7.7 // indirect github.com/mailru/easyjson v0.7.7 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect github.com/moby/spdystream v0.5.0 // indirect
github.com/moby/spdystream v0.2.0 // indirect github.com/moby/sys/mountinfo v0.7.2 // indirect
github.com/moby/sys/mountinfo v0.7.1 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/nxadm/tail v1.4.8 // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/opencontainers/runc v1.2.0-rc.3 // indirect github.com/opencontainers/selinux v1.11.1 // indirect
github.com/opencontainers/selinux v1.11.0 // indirect
github.com/pkg/errors v0.9.1 // indirect github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/prometheus/client_model v0.4.0 // indirect github.com/prometheus/client_model v0.6.1 // indirect
github.com/prometheus/common v0.44.0 // indirect github.com/prometheus/common v0.55.0 // indirect
github.com/prometheus/procfs v0.12.0 // indirect github.com/prometheus/procfs v0.15.1 // indirect
github.com/sirupsen/logrus v1.9.3 // indirect go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.53.0 // indirect
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.1 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.1 // indirect go.opentelemetry.io/otel v1.28.0 // indirect
go.opentelemetry.io/otel v1.21.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.28.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.21.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.21.0 // indirect go.opentelemetry.io/otel/metric v1.28.0 // indirect
go.opentelemetry.io/otel/metric v1.21.0 // indirect go.opentelemetry.io/otel/sdk v1.28.0 // indirect
go.opentelemetry.io/otel/sdk v1.21.0 // indirect go.opentelemetry.io/otel/trace v1.28.0
go.opentelemetry.io/otel/trace v1.21.0 go.opentelemetry.io/proto/otlp v1.3.1 // indirect
go.opentelemetry.io/proto/otlp v1.1.0 // indirect golang.org/x/mod v0.24.0 // indirect
golang.org/x/mod v0.17.0 // indirect golang.org/x/oauth2 v0.30.0 // indirect
golang.org/x/oauth2 v0.17.0 // indirect golang.org/x/sync v0.12.0 // indirect
golang.org/x/sync v0.10.0 // indirect golang.org/x/sys v0.32.0 // indirect
golang.org/x/sys v0.28.0 // indirect golang.org/x/term v0.30.0 // indirect
golang.org/x/term v0.27.0 // indirect golang.org/x/text v0.23.0
golang.org/x/text v0.21.0 // indirect golang.org/x/tools v0.31.0 // indirect
golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect google.golang.org/genproto/googleapis/api v0.0.0-20240826202546-f6391c0de4c7 // indirect
google.golang.org/appengine v1.6.8 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240826202546-f6391c0de4c7 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de // indirect google.golang.org/protobuf v1.36.5 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda // indirect
google.golang.org/protobuf v1.33.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/cloud-provider v0.30.9 // indirect k8s.io/cloud-provider v0.32.0 // indirect
k8s.io/csi-translation-lib v0.30.9 // indirect k8s.io/csi-translation-lib v0.32.0 // indirect
k8s.io/dynamic-resource-allocation v0.30.9 // indirect k8s.io/dynamic-resource-allocation v0.32.0 // indirect
k8s.io/kube-scheduler v0.30.9 // indirect k8s.io/kube-scheduler v0.32.0 // indirect
k8s.io/mount-utils v0.30.9 // indirect k8s.io/mount-utils v0.32.0 // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3 // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect sigs.k8s.io/structured-merge-diff/v4 v4.4.2 // indirect
sigs.k8s.io/yaml v1.4.0 // indirect sigs.k8s.io/yaml v1.4.0 // indirect
) )
replace ( replace (
golang.org/x/sys => golang.org/x/sys v0.19.0 golang.org/x/sys => golang.org/x/sys v0.19.0
k8s.io/api => k8s.io/api v0.30.9 k8s.io/api => k8s.io/api v0.32.6
k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.30.9 k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.32.6
k8s.io/apimachinery => k8s.io/apimachinery v0.30.9 k8s.io/apimachinery => k8s.io/apimachinery v0.32.6
k8s.io/apiserver => k8s.io/apiserver v0.30.9 k8s.io/apiserver => k8s.io/apiserver v0.32.6
k8s.io/cli-runtime => k8s.io/cli-runtime v0.30.9 k8s.io/cli-runtime => k8s.io/cli-runtime v0.32.6
k8s.io/client-go => k8s.io/client-go v0.30.9 k8s.io/client-go => k8s.io/client-go v0.32.6
k8s.io/cloud-provider => k8s.io/cloud-provider v0.30.9 k8s.io/cloud-provider => k8s.io/cloud-provider v0.32.6
k8s.io/cluster-bootstrap => k8s.io/cluster-bootstrap v0.30.9 k8s.io/cluster-bootstrap => k8s.io/cluster-bootstrap v0.32.6
k8s.io/code-generator => k8s.io/code-generator v0.30.9 k8s.io/code-generator => k8s.io/code-generator v0.32.6
k8s.io/component-base => k8s.io/component-base v0.30.9 k8s.io/component-base => k8s.io/component-base v0.32.6
k8s.io/component-helpers => k8s.io/component-helpers v0.30.9 k8s.io/component-helpers => k8s.io/component-helpers v0.32.6
k8s.io/controller-manager => k8s.io/controller-manager v0.30.9 k8s.io/controller-manager => k8s.io/controller-manager v0.32.6
k8s.io/cri-api => k8s.io/cri-api v0.30.9 k8s.io/cri-api => k8s.io/cri-api v0.32.6
k8s.io/csi-translation-lib => k8s.io/csi-translation-lib v0.30.9 k8s.io/cri-client => k8s.io/cri-client v0.32.6
k8s.io/dynamic-resource-allocation => k8s.io/dynamic-resource-allocation v0.30.9 k8s.io/csi-translation-lib => k8s.io/csi-translation-lib v0.32.6
k8s.io/endpointslice => k8s.io/endpointslice v0.30.9 k8s.io/dynamic-resource-allocation => k8s.io/dynamic-resource-allocation v0.32.6
k8s.io/kms => k8s.io/kms v0.30.9 k8s.io/endpointslice => k8s.io/endpointslice v0.32.6
k8s.io/kube-aggregator => k8s.io/kube-aggregator v0.30.9 k8s.io/externaljwt => k8s.io/externaljwt v0.32.6
k8s.io/kube-controller-manager => k8s.io/kube-controller-manager v0.30.9 k8s.io/kms => k8s.io/kms v0.32.6
k8s.io/kube-aggregator => k8s.io/kube-aggregator v0.32.6
k8s.io/kube-controller-manager => k8s.io/kube-controller-manager v0.32.6
k8s.io/kube-proxy => k8s.io/kube-proxy v0.30.9 k8s.io/kube-proxy => k8s.io/kube-proxy v0.30.9
k8s.io/kube-scheduler => k8s.io/kube-scheduler v0.30.9 k8s.io/kube-scheduler => k8s.io/kube-scheduler v0.32.0
k8s.io/kubectl => k8s.io/kubectl v0.30.9 k8s.io/kubectl => k8s.io/kubectl v0.32.6
k8s.io/kubelet => k8s.io/kubelet v0.30.9 k8s.io/kubelet => k8s.io/kubelet v0.32.6
k8s.io/legacy-cloud-providers => k8s.io/legacy-cloud-providers v0.30.9 k8s.io/legacy-cloud-providers => k8s.io/legacy-cloud-providers v0.32.6
k8s.io/metrics => k8s.io/metrics v0.30.9 k8s.io/metrics => k8s.io/metrics v0.32.6
k8s.io/mount-utils => k8s.io/mount-utils v0.30.9 k8s.io/mount-utils => k8s.io/mount-utils v0.32.6
k8s.io/pod-security-admission => k8s.io/pod-security-admission v0.30.9 k8s.io/pod-security-admission => k8s.io/pod-security-admission v0.32.6
k8s.io/sample-apiserver => k8s.io/sample-apiserver v0.30.9 k8s.io/sample-apiserver => k8s.io/sample-apiserver v0.32.6
) )

412
go.sum
View File

@ -1,14 +1,13 @@
cloud.google.com/go v0.112.0 h1:tpFCD7hpHFlQ8yPwT3x+QeXqc2T6+n6T+hmABHfDUSM= cel.dev/expr v0.18.0 h1:CJ6drgk+Hf96lkLikr4rFf19WrU0BOWEihyZnI2TAzo=
cloud.google.com/go/compute v1.24.0 h1:phWcR2eWzRJaL/kOiJwfFsPs4BaKq1j6vnpZrc1YlVg= cel.dev/expr v0.18.0/go.mod h1:MrpN08Q+lEBs+bGYdLxxHkZoUSsCp0nSKTs0nTymJgw=
cloud.google.com/go/compute v1.24.0/go.mod h1:kw1/T+h/+tK2LJK0wiPPx1intgdAM3j/g3hFDlscY40= github.com/AdaLogics/go-fuzz-headers v0.0.0-20240806141605-e8a1dd7889d6 h1:He8afgbRMd7mFxO99hRNu+6tazq8nFF9lIwo9JFroBk=
cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY= github.com/AdaLogics/go-fuzz-headers v0.0.0-20240806141605-e8a1dd7889d6/go.mod h1:8o94RPi1/7XTJvwPpRSzSUedZrtlirdB3r9Z20bi2f8=
cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY=
github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU=
github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM=
github.com/NYTimes/gziphandler v1.1.1 h1:ZUDjpQae29j0ryrS0u/B8HZfJBtBQHjqw2rQ2cqUQ3I= github.com/NYTimes/gziphandler v1.1.1 h1:ZUDjpQae29j0ryrS0u/B8HZfJBtBQHjqw2rQ2cqUQ3I=
github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c= github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c=
github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230305170008-8188dc5388df h1:7RFfzj4SSt6nnvCPbCqijJi1nWCd+TqAT3bYCStRC18= github.com/antlr4-go/antlr/v4 v4.13.0 h1:lxCg3LAv+EUK6t1i0y1V6/SLeUi0eKEKdhQAlS8TVTI=
github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230305170008-8188dc5388df/go.mod h1:pSwJ0fSY5KhvocuWSx4fz3BA8OrA1bQn+K1Eli3BRwM= github.com/antlr4-go/antlr/v4 v4.13.0/go.mod h1:pfChB/xh/Unjila75QW7+VU4TSnWnnk9UTnmpPaOR2g=
github.com/appscode/jsonpatch v1.0.1 h1:e82Bj+rsBSnpsmjiIGlc9NiKSBpJONZkamk/F8GrCR0= github.com/appscode/jsonpatch v1.0.1 h1:e82Bj+rsBSnpsmjiIGlc9NiKSBpJONZkamk/F8GrCR0=
github.com/appscode/jsonpatch v1.0.1/go.mod h1:4AJxUpXUhv4N+ziTvIcWWXgeorXpxPZOfk9HdEVr96M= github.com/appscode/jsonpatch v1.0.1/go.mod h1:4AJxUpXUhv4N+ziTvIcWWXgeorXpxPZOfk9HdEVr96M=
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio=
@ -21,42 +20,39 @@ github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM
github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ=
github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8=
github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE=
github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs=
github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa h1:jQCWAUqqlij9Pgj2i/PB79y4KOPYVyFYdROxgaCwdTQ=
github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa/go.mod h1:x/1Gn8zydmfq8dk6e9PdstVsDgu9RuyIIJqAaF//0IM=
github.com/coreos/go-semver v0.3.1 h1:yi21YpKnrx1gt5R+la8n5WgS0kCrsPp33dmEyHReZr4= github.com/coreos/go-semver v0.3.1 h1:yi21YpKnrx1gt5R+la8n5WgS0kCrsPp33dmEyHReZr4=
github.com/coreos/go-semver v0.3.1/go.mod h1:irMmmIw/7yzSRPWryHsK7EYSg09caPQL03VsM8rvUec= github.com/coreos/go-semver v0.3.1/go.mod h1:irMmmIw/7yzSRPWryHsK7EYSg09caPQL03VsM8rvUec=
github.com/coreos/go-systemd/v22 v22.5.0 h1:RrqgGjYQKalulkV8NGVIfkXQf6YYmOyiJKk8iXXhfZs= github.com/coreos/go-systemd/v22 v22.5.0 h1:RrqgGjYQKalulkV8NGVIfkXQf6YYmOyiJKk8iXXhfZs=
github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc=
github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
github.com/cyphar/filepath-securejoin v0.2.4 h1:Ugdm7cg7i6ZK6x3xDF1oEu1nfkyfH53EtKeQYTC3kyg=
github.com/cyphar/filepath-securejoin v0.2.4/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 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/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/distribution/reference v0.5.0 h1:/FUIFXtfc/x2gpa5/VGfiGLuOIdYa1t65IKK2OFGvA0= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM=
github.com/distribution/reference v0.5.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/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/distribution v2.8.2+incompatible h1:T3de5rq0dB1j30rp0sA2rER+m322EBzniBPB6ZIzuh8= github.com/docker/distribution v2.8.2+incompatible h1:T3de5rq0dB1j30rp0sA2rER+m322EBzniBPB6ZIzuh8=
github.com/docker/distribution v2.8.2+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/distribution v2.8.2+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY=
github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto=
github.com/emicklei/go-restful/v3 v3.11.0 h1:rAQeMHw1c7zTmncogyy8VvRZwtkmkZ4FxERmMY4rD+g= github.com/emicklei/go-restful/v3 v3.11.0 h1:rAQeMHw1c7zTmncogyy8VvRZwtkmkZ4FxERmMY4rD+g=
github.com/emicklei/go-restful/v3 v3.11.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/emicklei/go-restful/v3 v3.11.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc=
github.com/envoyproxy/protoc-gen-validate v1.0.4 h1:gVPz/FMfvh57HdSJQyvBtF00j8JU4zdyUgIUNhlgg0A=
github.com/envoyproxy/protoc-gen-validate v1.0.4/go.mod h1:qys6tmnRsYrQqIhm2bvKZH4Blx/1gTIZ2UKVY1M+Yew=
github.com/evanphx/json-patch v4.0.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch v4.0.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
github.com/evanphx/json-patch v5.6.0+incompatible h1:jBYDEEiFBPxA0v50tFdvOzQQTCvpL6mnFh5mB2/l16U= github.com/evanphx/json-patch v5.6.0+incompatible h1:jBYDEEiFBPxA0v50tFdvOzQQTCvpL6mnFh5mB2/l16U=
github.com/evanphx/json-patch v5.6.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch v5.6.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
github.com/evanphx/json-patch/v5 v5.9.0 h1:kcBlZQbplgElYIlo/n1hJbls2z/1awpXxpRi0/FOJfg= github.com/evanphx/json-patch/v5 v5.9.11 h1:/8HVnzMq13/3x9TPvjG08wUGqBTmZBsCWzjTM0wiaDU=
github.com/evanphx/json-patch/v5 v5.9.0/go.mod h1:VNkHZ/282BpEyt/tObQO8s5CMPmYYq14uClGH4abBuQ= github.com/evanphx/json-patch/v5 v5.9.11/go.mod h1:3j+LviiESTElxA4p3EMKAB9HXj3/XEtnUf6OZxqIQTM=
github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg=
github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U=
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA=
github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM=
github.com/fxamacker/cbor/v2 v2.7.0 h1:iM5WgngdRBanHcxugY4JySA0nk1wZorNOpTgCMedv5E=
github.com/fxamacker/cbor/v2 v2.7.0/go.mod h1:pxXPTn3joSm21Gbwsv0w9OSA2y1HFR9qXEeXQVeNoDQ=
github.com/go-bindata/go-bindata v3.1.2+incompatible h1:5vjJMVhowQdPzjE1LdxyFF7YFTXg5IgGVW4gBr5IbvE= github.com/go-bindata/go-bindata v3.1.2+incompatible h1:5vjJMVhowQdPzjE1LdxyFF7YFTXg5IgGVW4gBr5IbvE=
github.com/go-bindata/go-bindata v3.1.2+incompatible/go.mod h1:xK8Dsgwmeed+BBsSy2XTopBn/8uK2HWuGSnA11C3Joo= github.com/go-bindata/go-bindata v3.1.2+incompatible/go.mod h1:xK8Dsgwmeed+BBsSy2XTopBn/8uK2HWuGSnA11C3Joo=
github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU=
@ -67,24 +63,22 @@ 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/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
github.com/go-logr/zapr v1.3.0 h1:XGdV8XW8zdwFiwOA2Dryh1gj2KRQyOOoNmBy4EplIcQ= github.com/go-logr/zapr v1.3.0 h1:XGdV8XW8zdwFiwOA2Dryh1gj2KRQyOOoNmBy4EplIcQ=
github.com/go-logr/zapr v1.3.0/go.mod h1:YKepepNBd1u/oyhd/yQmtjVXmm9uML4IXUgMOwR8/Gg= github.com/go-logr/zapr v1.3.0/go.mod h1:YKepepNBd1u/oyhd/yQmtjVXmm9uML4IXUgMOwR8/Gg=
github.com/go-openapi/jsonpointer v0.19.6 h1:eCs3fxoIi3Wh6vtgmLTOjdhSpiqphQ+DaPn38N2ZdrE=
github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= 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=
github.com/go-openapi/jsonreference v0.20.2 h1:3sVjiK66+uXK/6oQ8xgcRKcFgQ5KXa2KvnJRumpMGbE= github.com/go-openapi/jsonreference v0.20.2 h1:3sVjiK66+uXK/6oQ8xgcRKcFgQ5KXa2KvnJRumpMGbE=
github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k=
github.com/go-openapi/swag v0.22.3 h1:yMBqmnQ0gyZvEb/+KzuWZOXgllrXT4SADYbvDaXHv/g=
github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14=
github.com/go-openapi/swag v0.23.0 h1:vsEVJDUo2hPJ2tu0/Xc+4noaxyEffXNIs3cOULZ+GrE=
github.com/go-openapi/swag v0.23.0/go.mod h1:esZ8ITTYEsH1V2trKHjAN8Ai7xHb8RV+YSZ577vPjgQ=
github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE=
github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI=
github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls= github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8=
github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
github.com/golang-jwt/jwt/v4 v4.5.0 h1:7cYmW1XlMY7h7ii7UhUyChSgS5wUJEnm9uZVTGqOWzg= github.com/golang-jwt/jwt/v4 v4.5.0 h1:7cYmW1XlMY7h7ii7UhUyChSgS5wUJEnm9uZVTGqOWzg=
github.com/golang-jwt/jwt/v4 v4.5.0/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= github.com/golang-jwt/jwt/v4 v4.5.0/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0=
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE=
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc=
github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs=
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8=
github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA=
@ -92,32 +86,28 @@ github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrU
github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w=
github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=
github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek=
github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps=
github.com/google/btree v1.0.1 h1:gK4Kx5IaGY9CD5sPJ36FHiBJ6ZXl0kilRiiCj+jdYp4= github.com/google/btree v1.1.3 h1:CVpQJjYgC4VbzxeGVHfvZrv1ctoYCAI8vbl07Fcxlyg=
github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA= github.com/google/btree v1.1.3/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4=
github.com/google/cel-go v0.17.8 h1:j9m730pMZt1Fc4oKhCLUHfjj6527LuhYcYw0Rl8gqto= github.com/google/cel-go v0.22.0 h1:b3FJZxpiv1vTMo2/5RDUqAHPxkT8mmMfJIrq1llbf7g=
github.com/google/cel-go v0.17.8/go.mod h1:HXZKzB0LXqer5lHHgfWAnlYwJaQBDKMjxjulNQzhwhY= github.com/google/cel-go v0.22.0/go.mod h1:BuznPXXfQDpXKWQ9sPW3TzlAJN5zzFe+i9tIs0yC4s8=
github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I= github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I=
github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U= github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U=
github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= 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/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0=
github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 h1:K6RDEckDVWvDI9JAJYCmNdQXq6neHJOYx3V6jnqNEec= github.com/google/pprof v0.0.0-20250403155104-27863c87afa6 h1:BHT72Gu3keYf3ZEu2J0b1vyeLSOYI8bm5wbJM/8yDe8=
github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20250403155104-27863c87afa6/go.mod h1:boTsfXsheKC2y+lKOCMpSfarhxDeIzfZG1jqGcPl3cA=
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc=
github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 h1:+9834+KizmvFV7pXQGSXQTsaWhq2GjuNUt0aUU0YBYw= github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 h1:+9834+KizmvFV7pXQGSXQTsaWhq2GjuNUt0aUU0YBYw=
@ -126,15 +116,13 @@ github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92Bcuy
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk=
github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo=
github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw=
github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0 h1:Wqo399gCIufwto+VfwCSvsnfGpF/w5E9CNxSwbpD6No= github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 h1:bkypFPDjIYGfCYD5mRBvpqxfYX1YCS1PXdKYWi8FsN0=
github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0/go.mod h1:qmOFXW2epJhM0qSnUUYpldc7gVz2KMQwJ/QYCDIa7XU= github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0/go.mod h1:P+Lt/0by1T8bfcF3z737NnSbmxQAppXMRziHUxPOC8k=
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU=
github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA=
github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8=
github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
github.com/jonboulle/clockwork v0.2.2 h1:UOGuzwb1PwsrDAObMuhUnj0p5ULPj8V/xJ7Kx9qUBdQ= github.com/jonboulle/clockwork v0.4.0 h1:p4Cf1aMWXnXAUh8lVfewRBx1zaTSYKrKMF2g3ST4RZ4=
github.com/jonboulle/clockwork v0.2.2/go.mod h1:Pkfl5aHPm1nk2H9h0bjmnJD/BcgbGXUBGnn1kMkgxc8= github.com/jonboulle/clockwork v0.4.0/go.mod h1:xgRqUGwRcjKCO1vbZUEtSLrqKoPSsUpK7fnezOII0kc=
github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY=
github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= 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 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
@ -151,12 +139,12 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0=
github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc=
github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= github.com/moby/spdystream v0.5.0 h1:7r0J1Si3QO/kjRitvSLVVFUjxMEb/YLj6S9FF62JBCU=
github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/moby/spdystream v0.5.0/go.mod h1:xBAYlnt/ay+11ShkdFKNAG7LsyK/tmNBVvVOwrfMgdI=
github.com/moby/spdystream v0.2.0 h1:cjW1zVyyoiM0T7b6UoySUFqzXMoqRckQtXwGPiBhOM8= github.com/moby/sys/mountinfo v0.7.2 h1:1shs6aH5s4o5H2zQLn796ADW1wMrIwHsyJ2v9KouLrg=
github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c= github.com/moby/sys/mountinfo v0.7.2/go.mod h1:1YOa8w8Ih7uW0wALDUgT1dTTSBrZ+HiBLGws92L2RU4=
github.com/moby/sys/mountinfo v0.7.1 h1:/tTvQaSJRr2FshkhXiIpux6fQ2Zvc4j7tAhMTStAG2g= github.com/moby/sys/userns v0.1.0 h1:tVLXkFOxVu9A64/yh59slHVv9ahO9UIev4JZusOLG/g=
github.com/moby/sys/mountinfo v0.7.1/go.mod h1:IJb6JQeOklcdMU9F5xQ8ZALD+CUr5VlGpwtX+VE0rpI= github.com/moby/sys/userns v0.1.0/go.mod h1:IHUYgu/kao6N8YZlp9Cf444ySSvCmDlmzUcYfDHOl28=
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
@ -167,58 +155,59 @@ github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8m
github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f h1:y5//uYreIhSUg3J1GEMiLbxo1LJaP8RfCpH6pymGZus= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f h1:y5//uYreIhSUg3J1GEMiLbxo1LJaP8RfCpH6pymGZus=
github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw=
github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A=
github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE=
github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU=
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk=
github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE=
github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU=
github.com/onsi/ginkgo/v2 v2.17.1 h1:V++EzdbhI4ZV4ev0UTIj0PzhzOcReJFyJaLjtSF55M8= github.com/onsi/ginkgo/v2 v2.23.4 h1:ktYTpKJAVZnDT4VjxSbiBenUjmlL/5QkBEocaWXiQus=
github.com/onsi/ginkgo/v2 v2.17.1/go.mod h1:llBI3WDLL9Z6taip6f33H76YcWtJv+7R3HigUjbIBOs= github.com/onsi/ginkgo/v2 v2.23.4/go.mod h1:Bt66ApGPBFzHyR+JO10Zbt0Gsp4uWxu5mIOTusL46e8=
github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=
github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=
github.com/onsi/gomega v1.33.0 h1:snPCflnZrpMsy94p4lXVEkHo12lmPnc3vY5XBbreexE= github.com/onsi/gomega v1.36.3 h1:hID7cr8t3Wp26+cYnfcjR6HpJ00fdogN6dqZ1t6IylU=
github.com/onsi/gomega v1.33.0/go.mod h1:+925n5YtiFsLzzafLUHzVMBpvvRAzrydIBiSIxjX3wY= github.com/onsi/gomega v1.36.3/go.mod h1:8D9+Txp43QWKhM24yyOBEdpkzN8FvJyAwecBgsU4KU0=
github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= 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/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM=
github.com/opencontainers/runc v1.2.0-rc.3 h1:5vQhejBp4S5w1DwFZ7L3CSOQX9cmcc8JKFy/mOBTJlo= github.com/opencontainers/selinux v1.11.1 h1:nHFvthhM0qY8/m+vfhJylliSshm8G1jJ2jDMcgULaH8=
github.com/opencontainers/runc v1.2.0-rc.3/go.mod h1:HADgqJU4nqAmOpe+uYBTJ4ZRvjks3ptCjKXp1pHqmCc= github.com/opencontainers/selinux v1.11.1/go.mod h1:E5dMC3VPuVvVHDYmi78qvhJp8+M586T4DlDRYpFkyec=
github.com/opencontainers/selinux v1.11.0 h1:+5Zbo97w3Lbmb3PeqQtpmTkMwsW5nRI3YaLpt7tQ7oU=
github.com/opencontainers/selinux v1.11.0/go.mod h1:E5dMC3VPuVvVHDYmi78qvhJp8+M586T4DlDRYpFkyec=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= 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/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/prometheus/client_golang v1.16.0 h1:yk/hx9hDbrGHovbci4BY+pRMfSuuat626eFsHb7tmT8= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U=
github.com/prometheus/client_golang v1.16.0/go.mod h1:Zsulrv/L9oM40tJ7T815tM89lFEugiJ9HzIqaAx4LKc= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/prometheus/client_model v0.4.0 h1:5lQXD3cAg1OXBf4Wq03gTrXHeaV0TQvGfUooCfx1yqY= github.com/prashantv/gostub v1.1.0 h1:BTyx3RfQjRHnUWaGF9oQos79AlQ5k8WNktv7VGvVH4g=
github.com/prometheus/client_model v0.4.0/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU= github.com/prashantv/gostub v1.1.0/go.mod h1:A5zLQHz7ieHGG7is6LLXLz7I8+3LZzsrV0P1IAHhP5U=
github.com/prometheus/common v0.44.0 h1:+5BrQJwiBB9xsMygAB3TNvpQKOwlkc25LbISbrdOOfY= github.com/prometheus/client_golang v1.19.1 h1:wZWJDwK+NameRJuPGDhlnFgx8e8HN3XHQeLaYJFJBOE=
github.com/prometheus/common v0.44.0/go.mod h1:ofAIvZbQ1e/nugmZGz4/qCb9Ap1VoSTIO7x0VV9VvuY= github.com/prometheus/client_golang v1.19.1/go.mod h1:mP78NwGzrVks5S2H6ab8+ZZGJLZUq1hoULYBAYBw1Ho=
github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E=
github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY=
github.com/prometheus/common v0.55.0 h1:KEi6DK7lXW/m7Ig5i47x0vRzuBsHuvJdi5ee6Y3G1dc=
github.com/prometheus/common v0.55.0/go.mod h1:2SECS4xJG1kd8XF9IcM1gMX6510RAEL65zxzNImwdc8=
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/robfig/cron/v3 v3.0.1 h1:WdRxkvbJztn8LMz/QEvLN5sBU+xKpSqwwUO1Pjr4qDs= 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/robfig/cron/v3 v3.0.1/go.mod h1:eQICP3HwyT7UooqI/z+Ov+PtYAWygg1TEWWzGIFLtro=
github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8=
github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4=
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ=
github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= 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 h1:jjzc5WVemNEDTLwv9tlmemhC73tI08BNOIGwBOo10Js=
github.com/soheilhy/cmux v0.1.5/go.mod h1:T7TcVDs9LWfQgPlPsdngu6I6QIoyIFZDDC6sNE1GqG0= github.com/soheilhy/cmux v0.1.5/go.mod h1:T7TcVDs9LWfQgPlPsdngu6I6QIoyIFZDDC6sNE1GqG0=
github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0= github.com/spf13/cobra v1.8.1 h1:e5/vxKd/rZsfSJMUX1agtjeTDf+qv1/JdBF8gg5k9ZM=
github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho= github.com/spf13/cobra v1.8.1/go.mod h1:wHxEcudfqmLYa8iTfL+OuZPbBZkmvliBWKIezN3kD9Y=
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
github.com/stoewer/go-strcase v1.2.0 h1:Z2iHWqGXH00XYgqDmNgQbIBxf3wrNq0F3feEy0ainaU= github.com/stoewer/go-strcase v1.3.0 h1:g0eASXYtp+yvN9fK8sH94oCIk0fau9uV1/ZdJ0AVEzs=
github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= github.com/stoewer/go-strcase v1.3.0/go.mod h1:fAH5hQ5pehh+j3nZfvwdk2RgEgQjAoM8wodgtPmh1xo=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= 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.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY=
github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA=
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= 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.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.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
@ -226,208 +215,197 @@ github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsT
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
github.com/tmc/grpc-websocket-proxy v0.0.0-20220101234140-673ab2c3ae75 h1:6fotK7otjonDflCTK0BCfls4SPy3NcCVb5dqqmbRknE= 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/tmc/grpc-websocket-proxy v0.0.0-20220101234140-673ab2c3ae75/go.mod h1:KO6IkyS8Y3j8OdNO85qEYBsRPuteD+YciPomcXdrMnk=
github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 h1:eY9dn8+vbi4tKz5Qo6v2eYzo7kUS51QINcR5jNpbZS8= github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM=
github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg=
github.com/xiang90/probing v0.0.0-20221125231312-a49e3df8f510 h1:S2dVYn90KE98chqDkyE9Z4N61UnQd+KOfgp5Iu53llk=
github.com/xiang90/probing v0.0.0-20221125231312-a49e3df8f510/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU=
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= go.etcd.io/bbolt v1.3.11 h1:yGEzV1wPz2yVCLsD8ZAiGHhHVlczyC9d1rP43/VCRJ0=
go.etcd.io/bbolt v1.3.8 h1:xs88BrvEv273UsB79e0hcVrlUWmS0a8upikMFhSyAtA= go.etcd.io/bbolt v1.3.11/go.mod h1:dksAq7YMXoljX0xu6VF5DMZGbhYYoLUalEiSySYAS4I=
go.etcd.io/bbolt v1.3.8/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw= go.etcd.io/etcd/api/v3 v3.5.16 h1:WvmyJVbjWqK4R1E+B12RRHz3bRGy9XVfh++MgbN+6n0=
go.etcd.io/etcd/api/v3 v3.5.10 h1:szRajuUUbLyppkhs9K6BRtjY37l66XQQmw7oZRANE4k= go.etcd.io/etcd/api/v3 v3.5.16/go.mod h1:1P4SlIP/VwkDmGo3OlOD7faPeP8KDIFhqvciH5EfN28=
go.etcd.io/etcd/api/v3 v3.5.10/go.mod h1:TidfmT4Uycad3NM/o25fG3J07odo4GBB9hoxaodFCtI= go.etcd.io/etcd/client/pkg/v3 v3.5.16 h1:ZgY48uH6UvB+/7R9Yf4x574uCO3jIx0TRDyetSfId3Q=
go.etcd.io/etcd/client/pkg/v3 v3.5.10 h1:kfYIdQftBnbAq8pUWFXfpuuxFSKzlmM5cSn76JByiT0= go.etcd.io/etcd/client/pkg/v3 v3.5.16/go.mod h1:V8acl8pcEK0Y2g19YlOV9m9ssUe6MgiDSobSoaBAM0E=
go.etcd.io/etcd/client/pkg/v3 v3.5.10/go.mod h1:DYivfIviIuQ8+/lCq4vcxuseg2P2XbHygkKwFo9fc8U= go.etcd.io/etcd/client/v2 v2.305.16 h1:kQrn9o5czVNaukf2A2At43cE9ZtWauOtf9vRZuiKXow=
go.etcd.io/etcd/client/v2 v2.305.10 h1:MrmRktzv/XF8CvtQt+P6wLUlURaNpSDJHFZhe//2QE4= go.etcd.io/etcd/client/v2 v2.305.16/go.mod h1:h9YxWCzcdvZENbfzBTFCnoNumr2ax3F19sKMqHFmXHE=
go.etcd.io/etcd/client/v2 v2.305.10/go.mod h1:m3CKZi69HzilhVqtPDcjhSGp+kA1OmbNn0qamH80xjA= go.etcd.io/etcd/client/v3 v3.5.16 h1:sSmVYOAHeC9doqi0gv7v86oY/BTld0SEFGaxsU9eRhE=
go.etcd.io/etcd/client/v3 v3.5.10 h1:W9TXNZ+oB3MCd/8UjxHTWK5J9Nquw9fQBLJd5ne5/Ao= go.etcd.io/etcd/client/v3 v3.5.16/go.mod h1:X+rExSGkyqxvu276cr2OwPLBaeqFu1cIl4vmRjAD/50=
go.etcd.io/etcd/client/v3 v3.5.10/go.mod h1:RVeBnDz2PUEZqTpgqwAtUd8nAPf5kjyFyND7P1VkOKc= go.etcd.io/etcd/pkg/v3 v3.5.16 h1:cnavs5WSPWeK4TYwPYfmcr3Joz9BH+TZ6qoUtz6/+mc=
go.etcd.io/etcd/pkg/v3 v3.5.10 h1:WPR8K0e9kWl1gAhB5A7gEa5ZBTNkT9NdNWrR8Qpo1CM= go.etcd.io/etcd/pkg/v3 v3.5.16/go.mod h1:+lutCZHG5MBBFI/U4eYT5yL7sJfnexsoM20Y0t2uNuY=
go.etcd.io/etcd/pkg/v3 v3.5.10/go.mod h1:TKTuCKKcF1zxmfKWDkfz5qqYaE3JncKKZPFf8c1nFUs= go.etcd.io/etcd/raft/v3 v3.5.16 h1:zBXA3ZUpYs1AwiLGPafYAKKl/CORn/uaxYDwlNwndAk=
go.etcd.io/etcd/raft/v3 v3.5.10 h1:cgNAYe7xrsrn/5kXMSaH8kM/Ky8mAdMqGOxyYwpP0LA= go.etcd.io/etcd/raft/v3 v3.5.16/go.mod h1:P4UP14AxofMJ/54boWilabqqWoW9eLodl6I5GdGzazI=
go.etcd.io/etcd/raft/v3 v3.5.10/go.mod h1:odD6kr8XQXTy9oQnyMPBOr0TVe+gT0neQhElQ6jbGRc= go.etcd.io/etcd/server/v3 v3.5.16 h1:d0/SAdJ3vVsZvF8IFVb1k8zqMZ+heGcNfft71ul9GWE=
go.etcd.io/etcd/server/v3 v3.5.10 h1:4NOGyOwD5sUZ22PiWYKmfxqoeh72z6EhYjNosKGLmZg= go.etcd.io/etcd/server/v3 v3.5.16/go.mod h1:ynhyZZpdDp1Gq49jkUg5mfkDWZwXnn3eIqCqtJnrD/s=
go.etcd.io/etcd/server/v3 v3.5.10/go.mod h1:gBplPHfs6YI0L+RpGkTQO7buDbHv5HJGG/Bst0/zIPo= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.53.0 h1:9G6E0TXzGFVfTnawRzrPl83iHOAV7L8NJiR8RSGYV1g=
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.1 h1:SpGay3w+nEwMpfVnbqOLH5gY52/foP8RE8UzTZ1pdSE= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.53.0/go.mod h1:azvtTADFQJA8mX80jIH/akaE7h+dbm/sVuaHqN13w74=
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.1/go.mod h1:4UoMYEZOC0yN/sPGH76KPkkU7zgiEWYWL9vwmbnTJPE= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0 h1:4K4tsIXefpVJtvA/8srF4V4y0akAoPHkIslgAkjixJA=
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.1 h1:aFJWCqJMNjENlcleuuOkGAPH82y0yULBScfXcIEdS24= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0/go.mod h1:jjdQuTGVsXV4vSs+CJ2qYDeDPf9yIJV23qlIzBm73Vg=
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.1/go.mod h1:sEGXWArGqc3tVa+ekntsN65DmVbVeW+7lTKTjZF3/Fo= go.opentelemetry.io/otel v1.28.0 h1:/SqNcYk+idO0CxKEUOtKQClMK/MimZihKYMruSMViUo=
go.opentelemetry.io/otel v1.21.0 h1:hzLeKBZEL7Okw2mGzZ0cc4k/A7Fta0uoPgaJCr8fsFc= go.opentelemetry.io/otel v1.28.0/go.mod h1:q68ijF8Fc8CnMHKyzqL6akLO46ePnjkgfIMIjUIX9z4=
go.opentelemetry.io/otel v1.21.0/go.mod h1:QZzNPQPm1zLX4gZK4cMi+71eaorMSGT3A4znnUvNNEo= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.28.0 h1:3Q/xZUyC1BBkualc9ROb4G8qkH90LXEIICcs5zv1OYY=
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.21.0 h1:cl5P5/GIfFh4t6xyruOgJP5QiA1pw4fYYdv6nc6CBWw= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.28.0/go.mod h1:s75jGIWA9OfCMzF0xr+ZgfrB5FEbbV7UuYo32ahUiFI=
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.21.0/go.mod h1:zgBdWWAu7oEEMC06MMKc5NLbA/1YDXV1sMpSqEeLQLg= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0 h1:qFffATk0X+HD+f1Z8lswGiOQYKHRlzfmdJm0wEaVrFA=
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.21.0 h1:tIqheXEFWAZ7O8A7m+J0aPTmpJN3YQ7qetUAdkkkKpk= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0/go.mod h1:MOiCmryaYtc+V0Ei+Tx9o5S1ZjA7kzLucuVuyzBZloQ=
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.21.0/go.mod h1:nUeKExfxAQVbiVFn32YXpXZZHZ61Cc3s3Rn1pDBGAb0= go.opentelemetry.io/otel/metric v1.28.0 h1:f0HGvSl1KRAU1DLgLGFjrwVyismPlnuU6JD6bOeuA5Q=
go.opentelemetry.io/otel/metric v1.21.0 h1:tlYWfeo+Bocx5kLEloTjbcDwBuELRrIFxwdQ36PlJu4= go.opentelemetry.io/otel/metric v1.28.0/go.mod h1:Fb1eVBFZmLVTMb6PPohq3TO9IIhUisDsbJoL/+uQW4s=
go.opentelemetry.io/otel/metric v1.21.0/go.mod h1:o1p3CA8nNHW8j5yuQLdc1eeqEaPfzug24uvsyIEJRWM= go.opentelemetry.io/otel/sdk v1.28.0 h1:b9d7hIry8yZsgtbmM0DKyPWMMUMlK9NEKuIG4aBqWyE=
go.opentelemetry.io/otel/sdk v1.21.0 h1:FTt8qirL1EysG6sTQRZ5TokkU8d0ugCj8htOgThZXQ8= go.opentelemetry.io/otel/sdk v1.28.0/go.mod h1:oYj7ClPUA7Iw3m+r7GeEjz0qckQRJK2B8zjcZEfu7Pg=
go.opentelemetry.io/otel/sdk v1.21.0/go.mod h1:Nna6Yv7PWTdgJHVRD9hIYywQBRx7pbox6nwBnZIxl/E= go.opentelemetry.io/otel/trace v1.28.0 h1:GhQ9cUuQGmNDd5BTCP2dAvv75RdMxEfTmYejp+lkx9g=
go.opentelemetry.io/otel/trace v1.21.0 h1:WD9i5gzvoUPuXIXH24ZNBudiarZDKuekPqi/E8fpfLc= go.opentelemetry.io/otel/trace v1.28.0/go.mod h1:jPyXzNPg6da9+38HEwElrQiHlVMTnVfM3/yv2OlIHaI=
go.opentelemetry.io/otel/trace v1.21.0/go.mod h1:LGbsEB0f9LGjN+OZaQQ26sohbOmiMR+BaslueVtS/qQ= go.opentelemetry.io/proto/otlp v1.3.1 h1:TrMUixzpM0yuc/znrFTP9MMRh8trP93mkCiDVeXrui0=
go.opentelemetry.io/proto/otlp v1.1.0 h1:2Di21piLrCqJ3U3eXGCTPHE9R8Nh+0uglSnOyxikMeI= go.opentelemetry.io/proto/otlp v1.3.1/go.mod h1:0X1WI4de4ZsLrrJNLAQbFeLCm3T7yBkR0XqQ7niQU+8=
go.opentelemetry.io/proto/otlp v1.1.0/go.mod h1:GpBHCBWiqvVLDqmHZsoMM3C5ySeKTC7ej/RNTae6MdY= go.uber.org/automaxprocs v1.6.0 h1:O3y2/QNTOdbF+e/dpXNNW7Rx2hZ4sTIPyybbxyNqTUs=
go.uber.org/automaxprocs v1.6.0/go.mod h1:ifeIMSnPZuznNm6jmdzmU3/bfk01Fe2fotchwEFJ8r8=
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0=
go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y=
go.uber.org/zap v1.26.0 h1:sI7k6L95XOKS281NhVKOFCUNIvv9e0w4BF8N3u+tCRo= go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8=
go.uber.org/zap v1.26.0/go.mod h1:dtElttAiwGvoJ/vj4IwHBS/gXsEu/pZ50mUIRWuG0so= go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= 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-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.36.0 h1:AnAEvhDddvBdpY+uR+MyHmuZzzNqXSe/GvuDeob5L34=
golang.org/x/crypto v0.31.0 h1:ihbySMvVjLAeSH1IbfcRTkD/iNscyz8rGzjF/E5hV6U= golang.org/x/crypto v0.36.0/go.mod h1:Y4J0ReaxCR1IMaabaSMugxJES1EpwhBHhv2bDHklZvc=
golang.org/x/crypto v0.31.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk= golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 h1:2dVuKD2vS7b0QIHQbpyTISPd0LeHDbnYEryqj5Q1ug8=
golang.org/x/exp v0.0.0-20230224173230-c95f2b4c22f2 h1:Jvc7gsqn21cJHCmAWx0LiimpP18LZmUxkT5Mp7EZ1mI= golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56/go.mod h1:M4RDyNAINzryxdtnbRXRL/OHtkFuWGRjvuhBJpk2IlY=
golang.org/x/exp v0.0.0-20230224173230-c95f2b4c22f2/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc=
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= 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.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.24.0 h1:ZfthKaKaT4NrhGVZHO1/WDTwGES4De8KtWO0SIbNJMU=
golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA= golang.org/x/mod v0.24.0/go.mod h1:IXM97Txy2VM4PJ3gI61r1YEk/gAj6zAHN3AdZt6S9Ww=
golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= 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-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-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.38.0 h1:vRMAPTMaeGqVhG5QyLJHqNDwecKTomGeqbnfZyKlBI8=
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.38.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8=
golang.org/x/net v0.33.0 h1:74SYHlV8BIgHIFC/LrYkOGIwL19eTYXQ5wc6TBuO36I= golang.org/x/oauth2 v0.30.0 h1:dnDm7JmhM45NNpd8FDDeLhK6FwqbOf4MLCM9zb1BOHI=
golang.org/x/net v0.33.0/go.mod h1:HXLR5J+9DxmrqMwG9qjGCxZ+zKXxBru04zlTvWlWuN4= golang.org/x/oauth2 v0.30.0/go.mod h1:B++QgG3ZKulg6sRPGD/mqlHQs5rB3Ml9erfeDY7xKlU=
golang.org/x/oauth2 v0.17.0 h1:6m3ZPmLEFdVxKKWnKq4VqZ60gutO35zm+zrAHVmHyDQ=
golang.org/x/oauth2 v0.17.0/go.mod h1:OzPDGQiuQMguemayvdylqddI7qcD9lnSDb+1FiwQ5HA=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 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-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.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.12.0 h1:MHc5BpPuC30uJk597Ri8TV3CNZcTLu6B6z4lJy+g6Jw=
golang.org/x/sync v0.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ= golang.org/x/sync v0.12.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA=
golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o=
golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
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.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.30.0/go.mod h1:NYYFdzHoI5wRh/h5tDMdMqCqPJZEuNqVR5xJLd/n67g=
golang.org/x/term v0.27.0 h1:WP60Sv1nlK1T6SupCHbXzSaN0b9wUmsPoRS9b61A23Q=
golang.org/x/term v0.27.0/go.mod h1:iMsnZpn0cago0GOrHO2+Y7u7JPn5AylBrcoWkElMTSM=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.23.0 h1:D71I7dUrlY+VX0gQShAThNGHFxZ13dGLBHQLVl1mJlY=
golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.23.0/go.mod h1:/BLNzu4aZCJ1+kcD0DNRotWKage4q2rGVAg4o22unh4=
golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo= golang.org/x/time v0.7.0 h1:ntUhktv3OPE6TgYxXWv9vKvUSJyIFJlyohwbkEwPrKQ=
golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= golang.org/x/time v0.7.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM=
golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4=
golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20200505023115-26f46d2f7ef8/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200505023115-26f46d2f7ef8/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.31.0 h1:0EedkvKDbh+qistFTd0Bcwe/YLh4vHwWEkiI0toFIBU=
golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d h1:vU5i/LfpvrRCpgM/VPfJLg5KjxD3E+hfT1SH+d9zLwg= golang.org/x/tools v0.31.0/go.mod h1:naFTU+Cev749tSJRXJlna0T3WxKvb1kWEx15xA4SdmQ=
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-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-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-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
gomodules.xyz/jsonpatch/v2 v2.4.0 h1:Ci3iUJyx9UeRx7CeFN8ARgGbkESwJK+KB9lLcWxY/Zw= gomodules.xyz/jsonpatch/v2 v2.4.0 h1:Ci3iUJyx9UeRx7CeFN8ARgGbkESwJK+KB9lLcWxY/Zw=
gomodules.xyz/jsonpatch/v2 v2.4.0/go.mod h1:AH3dM2RI6uoBZxn3LVrfvJ3E0/9dG4cSrbuBJT4moAY= gomodules.xyz/jsonpatch/v2 v2.4.0/go.mod h1:AH3dM2RI6uoBZxn3LVrfvJ3E0/9dG4cSrbuBJT4moAY=
google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM=
google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds=
google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de h1:F6qOa9AZTYJXOUEr4jDysRDLrm4PHePlge4v4TGAlxY= google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de h1:F6qOa9AZTYJXOUEr4jDysRDLrm4PHePlge4v4TGAlxY=
google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:VUhTRKeHn9wwcdrk73nvdC9gF178Tzhmt/qyaFcPLSo= google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:VUhTRKeHn9wwcdrk73nvdC9gF178Tzhmt/qyaFcPLSo=
google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de h1:jFNzHPIeuzhdRwVhbZdiym9q0ory/xY3sA+v2wPg8I0= google.golang.org/genproto/googleapis/api v0.0.0-20240826202546-f6391c0de4c7 h1:YcyjlL1PRr2Q17/I0dPk2JmYS5CDXfcdb2Z3YRioEbw=
google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:5iCWqnniDlqZHrd3neWVTOwvh/v6s3232omMecelax8= google.golang.org/genproto/googleapis/api v0.0.0-20240826202546-f6391c0de4c7/go.mod h1:OCdP9MfskevB/rbYvHTsXTtKC+3bHWajPdoKgjcYkfo=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda h1:LI5DOvAxUPMv/50agcLLoo+AdWc1irS9Rzz4vPuD1V4= google.golang.org/genproto/googleapis/rpc v0.0.0-20240826202546-f6391c0de4c7 h1:2035KHhUv+EpyB+hWgJnaWKJOdX1E95w2S8Rr4uWKTs=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= google.golang.org/genproto/googleapis/rpc v0.0.0-20240826202546-f6391c0de4c7/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU=
google.golang.org/grpc v1.63.0 h1:WjKe+dnvABXyPJMD7KDNLxtoGk5tgk+YFWN6cBWjZE8= google.golang.org/grpc v1.65.0 h1:bs/cUb4lp1G5iImFFd3u5ixQzweKizoZJAwBNLR42lc=
google.golang.org/grpc v1.63.0/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= google.golang.org/grpc v1.65.0/go.mod h1:WgYC2ypjlB0EiQi6wdKixMqukr6lBc0Vo+oOgjrM5ZQ=
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE=
google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo=
google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.36.5 h1:tPhr+woSbjfYvY6/GPufUoYizxw1cF/yFoxJ2fmpwlM=
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.36.5/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE=
google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI=
google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/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 h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= 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/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc=
gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= 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 h1:bBRl1b0OH9s/DuPhuXpNl+VtCaJXFZ5/uEFST95x9zc=
gopkg.in/natefinch/lumberjack.v2 v2.2.1/go.mod h1:YD8tP3GAjkrDg1eZH7EGmyESg/lsYskCTPBJVb9jqSc= gopkg.in/natefinch/lumberjack.v2 v2.2.1/go.mod h1:YD8tP3GAjkrDg1eZH7EGmyESg/lsYskCTPBJVb9jqSc=
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
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.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 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
k8s.io/api v0.30.9 h1:yojLzwl7TBV3XusCHXvR2AnowQFVnL9Ui3/wAga3pv4= k8s.io/api v0.32.6 h1:UiBAMRzTP24Tz9UT1uhhmAv1auGTT9PT/npywSk9JrU=
k8s.io/api v0.30.9/go.mod h1:FGOLP66cj572P8rjO1H5x5+0vzmvf3bLc8pQlyQeBqk= k8s.io/api v0.32.6/go.mod h1:+iFCyQN34v2rsL53iQEN9lYE03mFdgPvgSXvATIDteg=
k8s.io/apiextensions-apiserver v0.30.9 h1:9Z9ADALJhh0iJYm9V4c2Pk+czkO9amMm5CEtafE2gPY= k8s.io/apiextensions-apiserver v0.32.6 h1:B9zv1tpW+090Prav3GP53A4W2Bv908AAouZYJWp0fy8=
k8s.io/apiextensions-apiserver v0.30.9/go.mod h1:RNWVgxNEnTaeBHPMiiUB5sb8IjuX98NcOsF85cnJQMg= k8s.io/apiextensions-apiserver v0.32.6/go.mod h1:3lAgylV3582qpXg8NWW4NOLdzxLC8mTcfPqqjAzOSTs=
k8s.io/apimachinery v0.30.9 h1:wDbY7vSPd3ALl5Fpw0yEiDyW5ozMyCpqsQ6anaCkpII= k8s.io/apimachinery v0.32.6 h1:odtEUjg7OT3132sBFsFn4Arj4Gd+BplYekmLQP8L3ak=
k8s.io/apimachinery v0.30.9/go.mod h1:iexa2somDaxdnj7bha06bhb43Zpa6eWH8N8dbqVjTUc= k8s.io/apimachinery v0.32.6/go.mod h1:GpHVgxoKlTxClKcteaeuF1Ul/lDVb74KpZcxcmLDElE=
k8s.io/apiserver v0.30.9 h1:AvRI7YteLGKBTv9nJ/LGz5WlyJr6h1Me4TfqKkSmOvc= k8s.io/apiserver v0.32.6 h1:SKt+2e4klvHes4nw3moBI3mCPuh3RFp0XtYzsjZOOjk=
k8s.io/apiserver v0.30.9/go.mod h1:pumPieZ4vKcfQRe8YYIUYyOQIFnCTBp1UXLtbsJWqyo= k8s.io/apiserver v0.32.6/go.mod h1:CleW9S9cdw3EAevI/RCFc7RtHTEgbcTFhZV28IEdRtU=
k8s.io/client-go v0.30.9 h1:nIO9MJIWK/H/rDHT0PikZhEmK0MSK5hyfdT9YMTMMC0= k8s.io/client-go v0.32.6 h1:Q+O+Sd9LKKFnsGZNVX2q1RDILYRpQZX+ea2RoIgjKlM=
k8s.io/client-go v0.30.9/go.mod h1:JObO2rfBeqrWn45GNMNnDReUfa6lgP4p+RjRLPJMaE8= k8s.io/client-go v0.32.6/go.mod h1:yqL9XJ2cTXy3WdJwdeyob3O6xiLwWrh9DP7SeszniW0=
k8s.io/cloud-provider v0.30.9 h1:cjoY8Yjv6jRbZ9ClBBqEQOD4y/jDP6eP5ucCkN40Ekg= k8s.io/cloud-provider v0.32.6 h1:oqjyLcDSFxBNB346Nd28RHNZnrKMjDoDIZowG8BpzUA=
k8s.io/cloud-provider v0.30.9/go.mod h1:hlErhj0ekIDHiO3SfbXDwL8cTqOfqq6adOdNAdvOmZM= k8s.io/cloud-provider v0.32.6/go.mod h1:7cJA50QLh5+uTL/JlMlwgthbg15SvJQPZ2WJMMQqYDM=
k8s.io/code-generator v0.30.9 h1:K8v/UOOK39OsQureRJImTWHI6R5dVoaJRqDa9BCjM8U= k8s.io/code-generator v0.32.6 h1:PxUFh/DLYQhL6t/hMjKaxUF5RDMV3YXh1FfzZkZ00uc=
k8s.io/code-generator v0.30.9/go.mod h1:hvORxGSX68n4rYoPMiaqpP+kvc/7MGz+09AJpzby/zI= k8s.io/code-generator v0.32.6/go.mod h1:ZgPiUB+rnn6/tdyxi2o9E139v7AgwVeVcIVNUxOAeTc=
k8s.io/component-base v0.30.9 h1:Zw/Q5esZ1Zj/s5VEyHZMCI41tTtgO2mYLuUtQXimXLg= k8s.io/component-base v0.32.6 h1:LwKaAlUcTyRouaqUdpQ+JLvtwyZlrWrNey1axNbE0ac=
k8s.io/component-base v0.30.9/go.mod h1:GWgCrimYzk+Wty984dLEAQ5oYAF7CSDywoMpb62V/6M= k8s.io/component-base v0.32.6/go.mod h1:fFJq5U4s+BAjmTV5gnT9CIfRbVujyITuO93ambmplcE=
k8s.io/component-helpers v0.30.9 h1:hBqWnzasEfndn0yKc3MpTWn46Mo/A7zrYj06B5VcwR8= k8s.io/component-helpers v0.32.6 h1:HeTAIZeasda5HDwRDXxU/bP9J1WVNRnvvR7bCR1ic5U=
k8s.io/component-helpers v0.30.9/go.mod h1:77gb0dDoZ5XULw0pOelLfQFi7+B+84McfD9e6yH5BUU= k8s.io/component-helpers v0.32.6/go.mod h1:UN/vFKDmMyVFjWpexcqIrm/UQeM/r0guRwBGwNbcOnw=
k8s.io/controller-manager v0.30.9 h1:/6M4Ftz3O1/26lCl4W8Y9bv2JxCD3e0vKLnrylNe/+w= k8s.io/controller-manager v0.32.6 h1:hBnhPQQ1z8Ifdfjrg8mcOm3o3uttXxCtXtNB9okTKBI=
k8s.io/controller-manager v0.30.9/go.mod h1:RH/RtVBCUIilHdIz+lYc/1niuyd3WFGS9GRvOYH+Tas= k8s.io/controller-manager v0.32.6/go.mod h1:O82IkfFfoEnXl1OB2muDkTXtDt6hob0uvxOyn/50B0A=
k8s.io/cri-api v0.30.9 h1:B7uhtB8GO2y6EZCSo4rhHEviyxtdhFQs4UkTT406hV8= k8s.io/cri-api v0.32.6 h1:ad0LTtSM2Gsigr9Dt1PSsjzeb71j7vOHFbFtKucCfvI=
k8s.io/cri-api v0.30.9/go.mod h1://4/umPJSW1ISNSNng4OwjpkvswJOQwU8rnkvO8P+xg= k8s.io/cri-api v0.32.6/go.mod h1:DCzMuTh2padoinefWME0G678Mc3QFbLMF2vEweGzBAI=
k8s.io/csi-translation-lib v0.30.9 h1:lHhJiT3Ehi4qtJpGq6f4eJipAUE6rCOU+mUTmeYuNgE= k8s.io/cri-client v0.32.6 h1:jwBApbijESaWi+jEfJp6bdLDlca9C/OAX7/kceEt12k=
k8s.io/csi-translation-lib v0.30.9/go.mod h1:aQgmkyLJ3KTzBRD4INwQXF2czQl64hZDWeF3pFI/pVU= k8s.io/cri-client v0.32.6/go.mod h1:xLAQSh9EXTc79e0zLdCw9x1tNVDAqpKwnoEFKo1S8wM=
k8s.io/dynamic-resource-allocation v0.30.9 h1:F44b/4XQOJFKMH0WYoFHPYB2pe509yNbw4DaszVzA4Y= k8s.io/csi-translation-lib v0.32.6 h1:AWHiUT8K/pcsl53str9EC9TQ6LZBTWF/L4YNaeRRlzs=
k8s.io/dynamic-resource-allocation v0.30.9/go.mod h1:odyqweypcWRFFXr/TBgH00x8CDVw8Y081mTVpqbVueo= k8s.io/csi-translation-lib v0.32.6/go.mod h1:Fza0F4T8ebNnkH/zApBQlJBHNH2GV9igplZZ+krnl/8=
k8s.io/dynamic-resource-allocation v0.32.6 h1:omKI7f5mLe2maMyFdoZtCAPmYBNP8oWPcLLfUv/F21c=
k8s.io/dynamic-resource-allocation v0.32.6/go.mod h1:h1WtBQ0aTwa94rOpCbUNxSA0IbfsrfmLT/R42ooPEtQ=
k8s.io/gengo v0.0.0-20230829151522-9cce18d56c01 h1:pWEwq4Asjm4vjW7vcsmijwBhOr1/shsbSYiWXmNGlks= k8s.io/gengo v0.0.0-20230829151522-9cce18d56c01 h1:pWEwq4Asjm4vjW7vcsmijwBhOr1/shsbSYiWXmNGlks=
k8s.io/gengo v0.0.0-20230829151522-9cce18d56c01/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/gengo v0.0.0-20230829151522-9cce18d56c01/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E=
k8s.io/gengo/v2 v2.0.0-20240228010128-51d4e06bde70 h1:NGrVE502P0s0/1hudf8zjgwki1X/TByhmAoILTarmzo= k8s.io/gengo/v2 v2.0.0-20240911193312-2b36238f13e9 h1:si3PfKm8dDYxgfbeA6orqrtLkvvIeH8UqffFJDl0bz4=
k8s.io/gengo/v2 v2.0.0-20240228010128-51d4e06bde70/go.mod h1:VH3AT8AaQOqiGjMF9p0/IM1Dj+82ZwjfxUP1IxaHE+8= k8s.io/gengo/v2 v2.0.0-20240911193312-2b36238f13e9/go.mod h1:EJykeLsmFC60UQbYJezXkEsG2FLrt0GPNkU5iK5GWxU=
k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y=
k8s.io/klog/v2 v2.120.1 h1:QXU6cPEOIslTGvZaXvFWiP9VKyeet3sawzTOvdXb4Vw= k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk=
k8s.io/klog/v2 v2.120.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE=
k8s.io/kms v0.30.9 h1:w4bNc7ruJf6PDEfyyeb2fjVuIqMBMMGch5KmE1sCYNA= k8s.io/kms v0.32.6 h1:xgfjoJj6iBbMinO0W1OGCKLhTLwPyW+6k2n8KznioSE=
k8s.io/kms v0.30.9/go.mod h1:GrMurD0qk3G4yNgGcsCEmepqf9KyyIrTXYR2lyUOJC4= k8s.io/kms v0.32.6/go.mod h1:Bk2evz/Yvk0oVrvm4MvZbgq8BD34Ksxs2SRHn4/UiOM=
k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 h1:BZqlfIlq5YbRMFko6/PM7FjZpUb45WallggurYhKGag= k8s.io/kube-openapi v0.0.0-20241105132330-32ad38e42d3f h1:GA7//TjRY9yWGy1poLzYYJJ4JRdzg3+O6e8I+e+8T5Y=
k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340/go.mod h1:yD4MZYeKMBwQKVht279WycxKyM84kkAx2DPrTXaeb98= k8s.io/kube-openapi v0.0.0-20241105132330-32ad38e42d3f/go.mod h1:R/HEjbvWI0qdfb8viZUeVZm0X6IZnxAydC7YU42CMw4=
k8s.io/kube-scheduler v0.30.9 h1:iUj7WsjU4NvPSX8XukGow2v3nh5p/dvw6/g+5OMVq2o= k8s.io/kube-scheduler v0.32.0 h1:FCsF/3TPvR51ptx/gLUrqcoKqAMhQKrydYCJzPz9VGM=
k8s.io/kube-scheduler v0.30.9/go.mod h1:2PAn/o0AZUGn6LfPFVEWk+qYkdDTnXsFxnwXrxirfvs= k8s.io/kube-scheduler v0.32.0/go.mod h1:yof3vmyx70TWoQ6XZruYEGIUT/r0H/ELGdnWiqPF5EE=
k8s.io/kubelet v0.30.9 h1:E8YYc/1CsRAXgzFuhAQGA2GnmftESSg/eJkGT1fh0nQ= k8s.io/kubelet v0.32.6 h1:6k4ziX0J9Ba6e/MhVgco6XvbM/sgBDNrBUJaQvCb8Qo=
k8s.io/kubelet v0.30.9/go.mod h1:j95DrESGPi/QVAZnuLTz5+45He4mF/EqVi9xKiXJyYw= k8s.io/kubelet v0.32.6/go.mod h1:IjMboyz52sXR3CHJmxdTnfJw5RnhJetN7vbs8mqzn6w=
k8s.io/kubernetes v1.30.9 h1:wo56bPk/+zZcqjiMTWpPuHPyh5vKY/bl75fEKIizneA= k8s.io/kubernetes v1.32.6 h1:tp1gRjOqZjaoFBek5PN6eSmODdS1QRrH5UKiFP8ZByg=
k8s.io/kubernetes v1.30.9/go.mod h1:hV3c+sqOEO0eVqgSo0KW5dOJ6UjGJ2l3Pd9+Qvft8UI= k8s.io/kubernetes v1.32.6/go.mod h1:REY0Gok66BTTrbGyZaFMNKO9JhxvgBDW9B7aksWRFoY=
k8s.io/mount-utils v0.30.9 h1:TJhmRDz0yKWlTHCeDDYsOZSPXQUYV3yDZh0pNpWi9WA= k8s.io/mount-utils v0.32.6 h1:eUzjHqe7FPK54MGeZf5TAD29OlF9ChutDomXvp0E4gM=
k8s.io/mount-utils v0.30.9/go.mod h1:9sCVmwGLcV1MPvbZ+rToMDnl1QcGozy+jBPd0MsQLIo= k8s.io/mount-utils v0.32.6/go.mod h1:Kun5c2svjAPx0nnvJKYQWhfeNW+O0EpzHgRhDcYoSY0=
k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI= k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738 h1:M3sRQVHv7vB20Xc2ybTt7ODCeFj6JSWYFzOFnYeS6Ro=
k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.29.0 h1:/U5vjBbQn3RChhv7P11uhYvCSm5G2GaIi5AIGBS6r4c= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.31.0 h1:CPT0ExVicCzcpeN4baWEV2ko2Z/AsiZgEdwgcfwLgMo=
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.29.0/go.mod h1:z7+wmGM2dfIiLRfrC6jb5kV2Mq/sK1ZP303cxzkV5Y4= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.31.0/go.mod h1:Ve9uj1L+deCXFrPOk1LpFXqTg7LCFzFso6PA48q/XZw=
sigs.k8s.io/controller-runtime v0.18.6 h1:UnEoLBLDpQwzJ2jYh6aTdiMhGjNDR7IdFn9YEqHIccc= sigs.k8s.io/controller-runtime v0.20.2 h1:/439OZVxoEc02psi1h4QO3bHzTgu49bb347Xp4gW1pc=
sigs.k8s.io/controller-runtime v0.18.6/go.mod h1:Dcsa9v8AEBWa3sQNJHsuWPT4ICv99irl5wj83NiC12U= sigs.k8s.io/controller-runtime v0.20.2/go.mod h1:xg2XB0K5ShQzAgsoujxuKN4LNXR2LfwwHsPj7Iaw+XY=
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3 h1:/Rv+M11QRah1itp8VhT6HoVx1Ray9eB4DBr+K+/sCJ8=
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3/go.mod h1:18nIHnGi6636UCz6m8i4DhaJ65T6EruyzmoQqI2BVDo=
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 h1:150L+0vs/8DA78h1u02ooW1/fFq/Lwr+sGiqlzvrtq4= sigs.k8s.io/structured-merge-diff/v4 v4.4.2 h1:MdmvkGuXi/8io6ixD5wud3vOLwc1rj0aNqRlpuvjmwA=
sigs.k8s.io/structured-merge-diff/v4 v4.4.1/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08= sigs.k8s.io/structured-merge-diff/v4 v4.4.2/go.mod h1:N8f93tFZh9U6vpxwRArLiikrE5/2tiu1w1AGfACIGE4=
sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc=
sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E=
sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY=

View File

@ -0,0 +1,84 @@
apiVersion: apps/v1
kind: DaemonSet
metadata:
labels:
control-plane: daemon
name: kruise-daemon-win
namespace: kruise-system
spec:
selector:
matchLabels:
control-plane: daemon
template:
metadata:
labels:
control-plane: daemon
spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: type
operator: NotIn
values:
- virtual-kubelet
containers:
- args:
- --logtostderr=true
- --v=5
- --addr=:10221
- --feature-gates=ImagePullJobGate=true
- --enable-pprof=true
- --pprof-addr=localhost:10222
workingDir: "$env:CONTAINER_SANDBOX_MOUNT_POINT/"
command:
- $env:CONTAINER_SANDBOX_MOUNT_POINT/kruise-daemon.exe
env:
- name: NODE_NAME
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: spec.nodeName
image: openkruise/kruise-daemon-win:test # Replace with the actual image
imagePullPolicy: Always
livenessProbe:
failureThreshold: 3
httpGet:
path: /healthz
port: 10221
scheme: HTTP
initialDelaySeconds: 60
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 1
name: daemon
resources:
limits:
cpu: 50m
memory: 128Mi
requests:
cpu: "0"
memory: "0"
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
dnsPolicy: ClusterFirstWithHostNet
hostNetwork: true
restartPolicy: Always
schedulerName: default-scheduler
securityContext:
windowsOptions:
hostProcess: true
runAsUserName: "NT AUTHORITY\\SYSTEM"
serviceAccount: kruise-daemon
serviceAccountName: kruise-daemon
terminationGracePeriodSeconds: 10
tolerations:
- operator: Exists
nodeSelector:
kubernetes.io/os: windows
updateStrategy:
rollingUpdate:
maxSurge: 0
maxUnavailable: 10%
type: RollingUpdate

View File

@ -23,11 +23,12 @@ import (
"os" "os"
"strings" "strings"
"k8s.io/kube-openapi/pkg/common"
"k8s.io/kube-openapi/pkg/validation/spec"
appspub "github.com/openkruise/kruise/apis/apps/pub" appspub "github.com/openkruise/kruise/apis/apps/pub"
appsv1alpha1 "github.com/openkruise/kruise/apis/apps/v1alpha1" appsv1alpha1 "github.com/openkruise/kruise/apis/apps/v1alpha1"
appsv1beta1 "github.com/openkruise/kruise/apis/apps/v1beta1" appsv1beta1 "github.com/openkruise/kruise/apis/apps/v1beta1"
"k8s.io/kube-openapi/pkg/common"
"k8s.io/kube-openapi/pkg/validation/spec"
) )
// Generate OpenAPI spec definitions for Kruise Resources // Generate OpenAPI spec definitions for Kruise Resources

View File

@ -67,6 +67,7 @@ const (
defaultRenewDeadline = 10 * time.Second defaultRenewDeadline = 10 * time.Second
defaultRetryPeriod = 2 * time.Second defaultRetryPeriod = 2 * time.Second
defaultControllerCacheSyncTimeout = 2 * time.Minute defaultControllerCacheSyncTimeout = 2 * time.Minute
defaultWebhookInitializeTimeout = 60 * time.Second
) )
var ( var (
@ -102,6 +103,7 @@ func main() {
var leaderElectionId string var leaderElectionId string
var retryPeriod time.Duration var retryPeriod time.Duration
var controllerCacheSyncTimeout time.Duration var controllerCacheSyncTimeout time.Duration
var webhookInitializeTimeout time.Duration
flag.StringVar(&metricsAddr, "metrics-addr", ":8080", "The address the metric endpoint binds to.") flag.StringVar(&metricsAddr, "metrics-addr", ":8080", "The address the metric endpoint binds to.")
flag.StringVar(&healthProbeAddr, "health-probe-addr", ":8000", "The address the healthz/readyz endpoint binds to.") flag.StringVar(&healthProbeAddr, "health-probe-addr", ":8000", "The address the healthz/readyz endpoint binds to.")
@ -126,6 +128,7 @@ func main() {
flag.DurationVar(&retryPeriod, "leader-election-retry-period", defaultRetryPeriod, flag.DurationVar(&retryPeriod, "leader-election-retry-period", defaultRetryPeriod,
"leader-election-retry-period is the duration the LeaderElector clients should wait between tries of actions. Default is 2 seconds.") "leader-election-retry-period is the duration the LeaderElector clients should wait between tries of actions. Default is 2 seconds.")
flag.DurationVar(&controllerCacheSyncTimeout, "controller-cache-sync-timeout", defaultControllerCacheSyncTimeout, "CacheSyncTimeout refers to the time limit set to wait for syncing caches. Defaults to 2 minutes if not set.") flag.DurationVar(&controllerCacheSyncTimeout, "controller-cache-sync-timeout", defaultControllerCacheSyncTimeout, "CacheSyncTimeout refers to the time limit set to wait for syncing caches. Defaults to 2 minutes if not set.")
flag.DurationVar(&webhookInitializeTimeout, "webhook-initialize-timeout", defaultWebhookInitializeTimeout, "WebhookInitializeTimeout refers to the time limit set to wait for webhook initialization. Defaults to 60 seconds if not set.")
utilfeature.DefaultMutableFeatureGate.AddFlag(pflag.CommandLine) utilfeature.DefaultMutableFeatureGate.AddFlag(pflag.CommandLine)
logOptions := logs.NewOptions() logOptions := logs.NewOptions()
@ -231,7 +234,7 @@ func main() {
// +kubebuilder:scaffold:builder // +kubebuilder:scaffold:builder
setupLog.Info("initialize webhook") setupLog.Info("initialize webhook")
if err := webhook.Initialize(ctx, cfg); err != nil { if err := webhook.Initialize(ctx, cfg, webhookInitializeTimeout); err != nil {
setupLog.Error(err, "unable to initialize webhook") setupLog.Error(err, "unable to initialize webhook")
os.Exit(1) os.Exit(1)
} }

View File

@ -18,8 +18,8 @@ limitations under the License.
package versioned package versioned
import ( import (
"fmt" fmt "fmt"
"net/http" http "net/http"
appsv1alpha1 "github.com/openkruise/kruise/pkg/client/clientset/versioned/typed/apps/v1alpha1" appsv1alpha1 "github.com/openkruise/kruise/pkg/client/clientset/versioned/typed/apps/v1alpha1"
appsv1beta1 "github.com/openkruise/kruise/pkg/client/clientset/versioned/typed/apps/v1beta1" appsv1beta1 "github.com/openkruise/kruise/pkg/client/clientset/versioned/typed/apps/v1beta1"

View File

@ -34,8 +34,12 @@ import (
// NewSimpleClientset returns a clientset that will respond with the provided objects. // NewSimpleClientset returns a clientset that will respond with the provided objects.
// It's backed by a very simple object tracker that processes creates, updates and deletions as-is, // It's backed by a very simple object tracker that processes creates, updates and deletions as-is,
// without applying any validations and/or defaults. It shouldn't be considered a replacement // 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. // for a real clientset and is mostly useful in simple unit tests.
//
// 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 { func NewSimpleClientset(objects ...runtime.Object) *Clientset {
o := testing.NewObjectTracker(scheme, codecs.UniversalDecoder()) o := testing.NewObjectTracker(scheme, codecs.UniversalDecoder())
for _, obj := range objects { for _, obj := range objects {

View File

@ -18,15 +18,14 @@ limitations under the License.
package v1alpha1 package v1alpha1
import ( import (
"context" context "context"
"time"
v1alpha1 "github.com/openkruise/kruise/apis/apps/v1alpha1" appsv1alpha1 "github.com/openkruise/kruise/apis/apps/v1alpha1"
scheme "github.com/openkruise/kruise/pkg/client/clientset/versioned/scheme" scheme "github.com/openkruise/kruise/pkg/client/clientset/versioned/scheme"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types" types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch" watch "k8s.io/apimachinery/pkg/watch"
rest "k8s.io/client-go/rest" gentype "k8s.io/client-go/gentype"
) )
// AdvancedCronJobsGetter has a method to return a AdvancedCronJobInterface. // AdvancedCronJobsGetter has a method to return a AdvancedCronJobInterface.
@ -37,158 +36,34 @@ type AdvancedCronJobsGetter interface {
// AdvancedCronJobInterface has methods to work with AdvancedCronJob resources. // AdvancedCronJobInterface has methods to work with AdvancedCronJob resources.
type AdvancedCronJobInterface interface { type AdvancedCronJobInterface interface {
Create(ctx context.Context, advancedCronJob *v1alpha1.AdvancedCronJob, opts v1.CreateOptions) (*v1alpha1.AdvancedCronJob, error) Create(ctx context.Context, advancedCronJob *appsv1alpha1.AdvancedCronJob, opts v1.CreateOptions) (*appsv1alpha1.AdvancedCronJob, error)
Update(ctx context.Context, advancedCronJob *v1alpha1.AdvancedCronJob, opts v1.UpdateOptions) (*v1alpha1.AdvancedCronJob, error) Update(ctx context.Context, advancedCronJob *appsv1alpha1.AdvancedCronJob, opts v1.UpdateOptions) (*appsv1alpha1.AdvancedCronJob, error)
UpdateStatus(ctx context.Context, advancedCronJob *v1alpha1.AdvancedCronJob, opts v1.UpdateOptions) (*v1alpha1.AdvancedCronJob, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
UpdateStatus(ctx context.Context, advancedCronJob *appsv1alpha1.AdvancedCronJob, opts v1.UpdateOptions) (*appsv1alpha1.AdvancedCronJob, error)
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.AdvancedCronJob, error) Get(ctx context.Context, name string, opts v1.GetOptions) (*appsv1alpha1.AdvancedCronJob, error)
List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.AdvancedCronJobList, error) List(ctx context.Context, opts v1.ListOptions) (*appsv1alpha1.AdvancedCronJobList, error)
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.AdvancedCronJob, err error) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *appsv1alpha1.AdvancedCronJob, err error)
AdvancedCronJobExpansion AdvancedCronJobExpansion
} }
// advancedCronJobs implements AdvancedCronJobInterface // advancedCronJobs implements AdvancedCronJobInterface
type advancedCronJobs struct { type advancedCronJobs struct {
client rest.Interface *gentype.ClientWithList[*appsv1alpha1.AdvancedCronJob, *appsv1alpha1.AdvancedCronJobList]
ns string
} }
// newAdvancedCronJobs returns a AdvancedCronJobs // newAdvancedCronJobs returns a AdvancedCronJobs
func newAdvancedCronJobs(c *AppsV1alpha1Client, namespace string) *advancedCronJobs { func newAdvancedCronJobs(c *AppsV1alpha1Client, namespace string) *advancedCronJobs {
return &advancedCronJobs{ return &advancedCronJobs{
client: c.RESTClient(), gentype.NewClientWithList[*appsv1alpha1.AdvancedCronJob, *appsv1alpha1.AdvancedCronJobList](
ns: namespace, "advancedcronjobs",
c.RESTClient(),
scheme.ParameterCodec,
namespace,
func() *appsv1alpha1.AdvancedCronJob { return &appsv1alpha1.AdvancedCronJob{} },
func() *appsv1alpha1.AdvancedCronJobList { return &appsv1alpha1.AdvancedCronJobList{} },
),
} }
} }
// Get takes name of the advancedCronJob, and returns the corresponding advancedCronJob object, and an error if there is any.
func (c *advancedCronJobs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.AdvancedCronJob, err error) {
result = &v1alpha1.AdvancedCronJob{}
err = c.client.Get().
Namespace(c.ns).
Resource("advancedcronjobs").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of AdvancedCronJobs that match those selectors.
func (c *advancedCronJobs) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.AdvancedCronJobList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1alpha1.AdvancedCronJobList{}
err = c.client.Get().
Namespace(c.ns).
Resource("advancedcronjobs").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested advancedCronJobs.
func (c *advancedCronJobs) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
Resource("advancedcronjobs").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(ctx)
}
// Create takes the representation of a advancedCronJob and creates it. Returns the server's representation of the advancedCronJob, and an error, if there is any.
func (c *advancedCronJobs) Create(ctx context.Context, advancedCronJob *v1alpha1.AdvancedCronJob, opts v1.CreateOptions) (result *v1alpha1.AdvancedCronJob, err error) {
result = &v1alpha1.AdvancedCronJob{}
err = c.client.Post().
Namespace(c.ns).
Resource("advancedcronjobs").
VersionedParams(&opts, scheme.ParameterCodec).
Body(advancedCronJob).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a advancedCronJob and updates it. Returns the server's representation of the advancedCronJob, and an error, if there is any.
func (c *advancedCronJobs) Update(ctx context.Context, advancedCronJob *v1alpha1.AdvancedCronJob, opts v1.UpdateOptions) (result *v1alpha1.AdvancedCronJob, err error) {
result = &v1alpha1.AdvancedCronJob{}
err = c.client.Put().
Namespace(c.ns).
Resource("advancedcronjobs").
Name(advancedCronJob.Name).
VersionedParams(&opts, scheme.ParameterCodec).
Body(advancedCronJob).
Do(ctx).
Into(result)
return
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *advancedCronJobs) UpdateStatus(ctx context.Context, advancedCronJob *v1alpha1.AdvancedCronJob, opts v1.UpdateOptions) (result *v1alpha1.AdvancedCronJob, err error) {
result = &v1alpha1.AdvancedCronJob{}
err = c.client.Put().
Namespace(c.ns).
Resource("advancedcronjobs").
Name(advancedCronJob.Name).
SubResource("status").
VersionedParams(&opts, scheme.ParameterCodec).
Body(advancedCronJob).
Do(ctx).
Into(result)
return
}
// Delete takes name of the advancedCronJob and deletes it. Returns an error if one occurs.
func (c *advancedCronJobs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("advancedcronjobs").
Name(name).
Body(&opts).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *advancedCronJobs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
var timeout time.Duration
if listOpts.TimeoutSeconds != nil {
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Namespace(c.ns).
Resource("advancedcronjobs").
VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout).
Body(&opts).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched advancedCronJob.
func (c *advancedCronJobs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.AdvancedCronJob, err error) {
result = &v1alpha1.AdvancedCronJob{}
err = c.client.Patch(pt).
Namespace(c.ns).
Resource("advancedcronjobs").
Name(name).
SubResource(subresources...).
VersionedParams(&opts, scheme.ParameterCodec).
Body(data).
Do(ctx).
Into(result)
return
}

View File

@ -18,10 +18,10 @@ limitations under the License.
package v1alpha1 package v1alpha1
import ( import (
"net/http" http "net/http"
v1alpha1 "github.com/openkruise/kruise/apis/apps/v1alpha1" appsv1alpha1 "github.com/openkruise/kruise/apis/apps/v1alpha1"
"github.com/openkruise/kruise/pkg/client/clientset/versioned/scheme" scheme "github.com/openkruise/kruise/pkg/client/clientset/versioned/scheme"
rest "k8s.io/client-go/rest" rest "k8s.io/client-go/rest"
) )
@ -164,10 +164,10 @@ func New(c rest.Interface) *AppsV1alpha1Client {
} }
func setConfigDefaults(config *rest.Config) error { func setConfigDefaults(config *rest.Config) error {
gv := v1alpha1.SchemeGroupVersion gv := appsv1alpha1.SchemeGroupVersion
config.GroupVersion = &gv config.GroupVersion = &gv
config.APIPath = "/apis" config.APIPath = "/apis"
config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() config.NegotiatedSerializer = rest.CodecFactoryForGeneratedClient(scheme.Scheme, scheme.Codecs).WithoutConversion()
if config.UserAgent == "" { if config.UserAgent == "" {
config.UserAgent = rest.DefaultKubernetesUserAgent() config.UserAgent = rest.DefaultKubernetesUserAgent()

View File

@ -18,15 +18,14 @@ limitations under the License.
package v1alpha1 package v1alpha1
import ( import (
"context" context "context"
"time"
v1alpha1 "github.com/openkruise/kruise/apis/apps/v1alpha1" appsv1alpha1 "github.com/openkruise/kruise/apis/apps/v1alpha1"
scheme "github.com/openkruise/kruise/pkg/client/clientset/versioned/scheme" scheme "github.com/openkruise/kruise/pkg/client/clientset/versioned/scheme"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types" types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch" watch "k8s.io/apimachinery/pkg/watch"
rest "k8s.io/client-go/rest" gentype "k8s.io/client-go/gentype"
) )
// BroadcastJobsGetter has a method to return a BroadcastJobInterface. // BroadcastJobsGetter has a method to return a BroadcastJobInterface.
@ -37,158 +36,34 @@ type BroadcastJobsGetter interface {
// BroadcastJobInterface has methods to work with BroadcastJob resources. // BroadcastJobInterface has methods to work with BroadcastJob resources.
type BroadcastJobInterface interface { type BroadcastJobInterface interface {
Create(ctx context.Context, broadcastJob *v1alpha1.BroadcastJob, opts v1.CreateOptions) (*v1alpha1.BroadcastJob, error) Create(ctx context.Context, broadcastJob *appsv1alpha1.BroadcastJob, opts v1.CreateOptions) (*appsv1alpha1.BroadcastJob, error)
Update(ctx context.Context, broadcastJob *v1alpha1.BroadcastJob, opts v1.UpdateOptions) (*v1alpha1.BroadcastJob, error) Update(ctx context.Context, broadcastJob *appsv1alpha1.BroadcastJob, opts v1.UpdateOptions) (*appsv1alpha1.BroadcastJob, error)
UpdateStatus(ctx context.Context, broadcastJob *v1alpha1.BroadcastJob, opts v1.UpdateOptions) (*v1alpha1.BroadcastJob, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
UpdateStatus(ctx context.Context, broadcastJob *appsv1alpha1.BroadcastJob, opts v1.UpdateOptions) (*appsv1alpha1.BroadcastJob, error)
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.BroadcastJob, error) Get(ctx context.Context, name string, opts v1.GetOptions) (*appsv1alpha1.BroadcastJob, error)
List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.BroadcastJobList, error) List(ctx context.Context, opts v1.ListOptions) (*appsv1alpha1.BroadcastJobList, error)
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.BroadcastJob, err error) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *appsv1alpha1.BroadcastJob, err error)
BroadcastJobExpansion BroadcastJobExpansion
} }
// broadcastJobs implements BroadcastJobInterface // broadcastJobs implements BroadcastJobInterface
type broadcastJobs struct { type broadcastJobs struct {
client rest.Interface *gentype.ClientWithList[*appsv1alpha1.BroadcastJob, *appsv1alpha1.BroadcastJobList]
ns string
} }
// newBroadcastJobs returns a BroadcastJobs // newBroadcastJobs returns a BroadcastJobs
func newBroadcastJobs(c *AppsV1alpha1Client, namespace string) *broadcastJobs { func newBroadcastJobs(c *AppsV1alpha1Client, namespace string) *broadcastJobs {
return &broadcastJobs{ return &broadcastJobs{
client: c.RESTClient(), gentype.NewClientWithList[*appsv1alpha1.BroadcastJob, *appsv1alpha1.BroadcastJobList](
ns: namespace, "broadcastjobs",
c.RESTClient(),
scheme.ParameterCodec,
namespace,
func() *appsv1alpha1.BroadcastJob { return &appsv1alpha1.BroadcastJob{} },
func() *appsv1alpha1.BroadcastJobList { return &appsv1alpha1.BroadcastJobList{} },
),
} }
} }
// Get takes name of the broadcastJob, and returns the corresponding broadcastJob object, and an error if there is any.
func (c *broadcastJobs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.BroadcastJob, err error) {
result = &v1alpha1.BroadcastJob{}
err = c.client.Get().
Namespace(c.ns).
Resource("broadcastjobs").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of BroadcastJobs that match those selectors.
func (c *broadcastJobs) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.BroadcastJobList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1alpha1.BroadcastJobList{}
err = c.client.Get().
Namespace(c.ns).
Resource("broadcastjobs").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested broadcastJobs.
func (c *broadcastJobs) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
Resource("broadcastjobs").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(ctx)
}
// Create takes the representation of a broadcastJob and creates it. Returns the server's representation of the broadcastJob, and an error, if there is any.
func (c *broadcastJobs) Create(ctx context.Context, broadcastJob *v1alpha1.BroadcastJob, opts v1.CreateOptions) (result *v1alpha1.BroadcastJob, err error) {
result = &v1alpha1.BroadcastJob{}
err = c.client.Post().
Namespace(c.ns).
Resource("broadcastjobs").
VersionedParams(&opts, scheme.ParameterCodec).
Body(broadcastJob).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a broadcastJob and updates it. Returns the server's representation of the broadcastJob, and an error, if there is any.
func (c *broadcastJobs) Update(ctx context.Context, broadcastJob *v1alpha1.BroadcastJob, opts v1.UpdateOptions) (result *v1alpha1.BroadcastJob, err error) {
result = &v1alpha1.BroadcastJob{}
err = c.client.Put().
Namespace(c.ns).
Resource("broadcastjobs").
Name(broadcastJob.Name).
VersionedParams(&opts, scheme.ParameterCodec).
Body(broadcastJob).
Do(ctx).
Into(result)
return
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *broadcastJobs) UpdateStatus(ctx context.Context, broadcastJob *v1alpha1.BroadcastJob, opts v1.UpdateOptions) (result *v1alpha1.BroadcastJob, err error) {
result = &v1alpha1.BroadcastJob{}
err = c.client.Put().
Namespace(c.ns).
Resource("broadcastjobs").
Name(broadcastJob.Name).
SubResource("status").
VersionedParams(&opts, scheme.ParameterCodec).
Body(broadcastJob).
Do(ctx).
Into(result)
return
}
// Delete takes name of the broadcastJob and deletes it. Returns an error if one occurs.
func (c *broadcastJobs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("broadcastjobs").
Name(name).
Body(&opts).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *broadcastJobs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
var timeout time.Duration
if listOpts.TimeoutSeconds != nil {
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Namespace(c.ns).
Resource("broadcastjobs").
VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout).
Body(&opts).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched broadcastJob.
func (c *broadcastJobs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.BroadcastJob, err error) {
result = &v1alpha1.BroadcastJob{}
err = c.client.Patch(pt).
Namespace(c.ns).
Resource("broadcastjobs").
Name(name).
SubResource(subresources...).
VersionedParams(&opts, scheme.ParameterCodec).
Body(data).
Do(ctx).
Into(result)
return
}

View File

@ -18,16 +18,15 @@ limitations under the License.
package v1alpha1 package v1alpha1
import ( import (
"context" context "context"
"time"
v1alpha1 "github.com/openkruise/kruise/apis/apps/v1alpha1" appsv1alpha1 "github.com/openkruise/kruise/apis/apps/v1alpha1"
scheme "github.com/openkruise/kruise/pkg/client/clientset/versioned/scheme" scheme "github.com/openkruise/kruise/pkg/client/clientset/versioned/scheme"
autoscalingv1 "k8s.io/api/autoscaling/v1" autoscalingv1 "k8s.io/api/autoscaling/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types" types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch" watch "k8s.io/apimachinery/pkg/watch"
rest "k8s.io/client-go/rest" gentype "k8s.io/client-go/gentype"
) )
// CloneSetsGetter has a method to return a CloneSetInterface. // CloneSetsGetter has a method to return a CloneSetInterface.
@ -38,15 +37,16 @@ type CloneSetsGetter interface {
// CloneSetInterface has methods to work with CloneSet resources. // CloneSetInterface has methods to work with CloneSet resources.
type CloneSetInterface interface { type CloneSetInterface interface {
Create(ctx context.Context, cloneSet *v1alpha1.CloneSet, opts v1.CreateOptions) (*v1alpha1.CloneSet, error) Create(ctx context.Context, cloneSet *appsv1alpha1.CloneSet, opts v1.CreateOptions) (*appsv1alpha1.CloneSet, error)
Update(ctx context.Context, cloneSet *v1alpha1.CloneSet, opts v1.UpdateOptions) (*v1alpha1.CloneSet, error) Update(ctx context.Context, cloneSet *appsv1alpha1.CloneSet, opts v1.UpdateOptions) (*appsv1alpha1.CloneSet, error)
UpdateStatus(ctx context.Context, cloneSet *v1alpha1.CloneSet, opts v1.UpdateOptions) (*v1alpha1.CloneSet, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
UpdateStatus(ctx context.Context, cloneSet *appsv1alpha1.CloneSet, opts v1.UpdateOptions) (*appsv1alpha1.CloneSet, error)
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.CloneSet, error) Get(ctx context.Context, name string, opts v1.GetOptions) (*appsv1alpha1.CloneSet, error)
List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.CloneSetList, error) List(ctx context.Context, opts v1.ListOptions) (*appsv1alpha1.CloneSetList, error)
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.CloneSet, err error) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *appsv1alpha1.CloneSet, err error)
GetScale(ctx context.Context, cloneSetName string, options v1.GetOptions) (*autoscalingv1.Scale, error) GetScale(ctx context.Context, cloneSetName string, options v1.GetOptions) (*autoscalingv1.Scale, error)
UpdateScale(ctx context.Context, cloneSetName string, scale *autoscalingv1.Scale, opts v1.UpdateOptions) (*autoscalingv1.Scale, error) UpdateScale(ctx context.Context, cloneSetName string, scale *autoscalingv1.Scale, opts v1.UpdateOptions) (*autoscalingv1.Scale, error)
@ -55,153 +55,28 @@ type CloneSetInterface interface {
// cloneSets implements CloneSetInterface // cloneSets implements CloneSetInterface
type cloneSets struct { type cloneSets struct {
client rest.Interface *gentype.ClientWithList[*appsv1alpha1.CloneSet, *appsv1alpha1.CloneSetList]
ns string
} }
// newCloneSets returns a CloneSets // newCloneSets returns a CloneSets
func newCloneSets(c *AppsV1alpha1Client, namespace string) *cloneSets { func newCloneSets(c *AppsV1alpha1Client, namespace string) *cloneSets {
return &cloneSets{ return &cloneSets{
client: c.RESTClient(), gentype.NewClientWithList[*appsv1alpha1.CloneSet, *appsv1alpha1.CloneSetList](
ns: namespace, "clonesets",
c.RESTClient(),
scheme.ParameterCodec,
namespace,
func() *appsv1alpha1.CloneSet { return &appsv1alpha1.CloneSet{} },
func() *appsv1alpha1.CloneSetList { return &appsv1alpha1.CloneSetList{} },
),
} }
} }
// Get takes name of the cloneSet, and returns the corresponding cloneSet object, and an error if there is any.
func (c *cloneSets) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.CloneSet, err error) {
result = &v1alpha1.CloneSet{}
err = c.client.Get().
Namespace(c.ns).
Resource("clonesets").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of CloneSets that match those selectors.
func (c *cloneSets) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.CloneSetList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1alpha1.CloneSetList{}
err = c.client.Get().
Namespace(c.ns).
Resource("clonesets").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested cloneSets.
func (c *cloneSets) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
Resource("clonesets").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(ctx)
}
// Create takes the representation of a cloneSet and creates it. Returns the server's representation of the cloneSet, and an error, if there is any.
func (c *cloneSets) Create(ctx context.Context, cloneSet *v1alpha1.CloneSet, opts v1.CreateOptions) (result *v1alpha1.CloneSet, err error) {
result = &v1alpha1.CloneSet{}
err = c.client.Post().
Namespace(c.ns).
Resource("clonesets").
VersionedParams(&opts, scheme.ParameterCodec).
Body(cloneSet).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a cloneSet and updates it. Returns the server's representation of the cloneSet, and an error, if there is any.
func (c *cloneSets) Update(ctx context.Context, cloneSet *v1alpha1.CloneSet, opts v1.UpdateOptions) (result *v1alpha1.CloneSet, err error) {
result = &v1alpha1.CloneSet{}
err = c.client.Put().
Namespace(c.ns).
Resource("clonesets").
Name(cloneSet.Name).
VersionedParams(&opts, scheme.ParameterCodec).
Body(cloneSet).
Do(ctx).
Into(result)
return
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *cloneSets) UpdateStatus(ctx context.Context, cloneSet *v1alpha1.CloneSet, opts v1.UpdateOptions) (result *v1alpha1.CloneSet, err error) {
result = &v1alpha1.CloneSet{}
err = c.client.Put().
Namespace(c.ns).
Resource("clonesets").
Name(cloneSet.Name).
SubResource("status").
VersionedParams(&opts, scheme.ParameterCodec).
Body(cloneSet).
Do(ctx).
Into(result)
return
}
// Delete takes name of the cloneSet and deletes it. Returns an error if one occurs.
func (c *cloneSets) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("clonesets").
Name(name).
Body(&opts).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *cloneSets) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
var timeout time.Duration
if listOpts.TimeoutSeconds != nil {
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Namespace(c.ns).
Resource("clonesets").
VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout).
Body(&opts).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched cloneSet.
func (c *cloneSets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.CloneSet, err error) {
result = &v1alpha1.CloneSet{}
err = c.client.Patch(pt).
Namespace(c.ns).
Resource("clonesets").
Name(name).
SubResource(subresources...).
VersionedParams(&opts, scheme.ParameterCodec).
Body(data).
Do(ctx).
Into(result)
return
}
// GetScale takes name of the cloneSet, and returns the corresponding autoscalingv1.Scale object, and an error if there is any. // GetScale takes name of the cloneSet, and returns the corresponding autoscalingv1.Scale object, and an error if there is any.
func (c *cloneSets) GetScale(ctx context.Context, cloneSetName string, options v1.GetOptions) (result *autoscalingv1.Scale, err error) { func (c *cloneSets) GetScale(ctx context.Context, cloneSetName string, options v1.GetOptions) (result *autoscalingv1.Scale, err error) {
result = &autoscalingv1.Scale{} result = &autoscalingv1.Scale{}
err = c.client.Get(). err = c.GetClient().Get().
Namespace(c.ns). Namespace(c.GetNamespace()).
Resource("clonesets"). Resource("clonesets").
Name(cloneSetName). Name(cloneSetName).
SubResource("scale"). SubResource("scale").
@ -214,8 +89,8 @@ func (c *cloneSets) GetScale(ctx context.Context, cloneSetName string, options v
// UpdateScale takes the top resource name and the representation of a scale and updates it. Returns the server's representation of the scale, and an error, if there is any. // UpdateScale takes the top resource name and the representation of a scale and updates it. Returns the server's representation of the scale, and an error, if there is any.
func (c *cloneSets) UpdateScale(ctx context.Context, cloneSetName string, scale *autoscalingv1.Scale, opts v1.UpdateOptions) (result *autoscalingv1.Scale, err error) { func (c *cloneSets) UpdateScale(ctx context.Context, cloneSetName string, scale *autoscalingv1.Scale, opts v1.UpdateOptions) (result *autoscalingv1.Scale, err error) {
result = &autoscalingv1.Scale{} result = &autoscalingv1.Scale{}
err = c.client.Put(). err = c.GetClient().Put().
Namespace(c.ns). Namespace(c.GetNamespace()).
Resource("clonesets"). Resource("clonesets").
Name(cloneSetName). Name(cloneSetName).
SubResource("scale"). SubResource("scale").

View File

@ -18,15 +18,14 @@ limitations under the License.
package v1alpha1 package v1alpha1
import ( import (
"context" context "context"
"time"
v1alpha1 "github.com/openkruise/kruise/apis/apps/v1alpha1" appsv1alpha1 "github.com/openkruise/kruise/apis/apps/v1alpha1"
scheme "github.com/openkruise/kruise/pkg/client/clientset/versioned/scheme" scheme "github.com/openkruise/kruise/pkg/client/clientset/versioned/scheme"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types" types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch" watch "k8s.io/apimachinery/pkg/watch"
rest "k8s.io/client-go/rest" gentype "k8s.io/client-go/gentype"
) )
// ContainerRecreateRequestsGetter has a method to return a ContainerRecreateRequestInterface. // ContainerRecreateRequestsGetter has a method to return a ContainerRecreateRequestInterface.
@ -37,158 +36,34 @@ type ContainerRecreateRequestsGetter interface {
// ContainerRecreateRequestInterface has methods to work with ContainerRecreateRequest resources. // ContainerRecreateRequestInterface has methods to work with ContainerRecreateRequest resources.
type ContainerRecreateRequestInterface interface { type ContainerRecreateRequestInterface interface {
Create(ctx context.Context, containerRecreateRequest *v1alpha1.ContainerRecreateRequest, opts v1.CreateOptions) (*v1alpha1.ContainerRecreateRequest, error) Create(ctx context.Context, containerRecreateRequest *appsv1alpha1.ContainerRecreateRequest, opts v1.CreateOptions) (*appsv1alpha1.ContainerRecreateRequest, error)
Update(ctx context.Context, containerRecreateRequest *v1alpha1.ContainerRecreateRequest, opts v1.UpdateOptions) (*v1alpha1.ContainerRecreateRequest, error) Update(ctx context.Context, containerRecreateRequest *appsv1alpha1.ContainerRecreateRequest, opts v1.UpdateOptions) (*appsv1alpha1.ContainerRecreateRequest, error)
UpdateStatus(ctx context.Context, containerRecreateRequest *v1alpha1.ContainerRecreateRequest, opts v1.UpdateOptions) (*v1alpha1.ContainerRecreateRequest, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
UpdateStatus(ctx context.Context, containerRecreateRequest *appsv1alpha1.ContainerRecreateRequest, opts v1.UpdateOptions) (*appsv1alpha1.ContainerRecreateRequest, error)
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.ContainerRecreateRequest, error) Get(ctx context.Context, name string, opts v1.GetOptions) (*appsv1alpha1.ContainerRecreateRequest, error)
List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.ContainerRecreateRequestList, error) List(ctx context.Context, opts v1.ListOptions) (*appsv1alpha1.ContainerRecreateRequestList, error)
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ContainerRecreateRequest, err error) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *appsv1alpha1.ContainerRecreateRequest, err error)
ContainerRecreateRequestExpansion ContainerRecreateRequestExpansion
} }
// containerRecreateRequests implements ContainerRecreateRequestInterface // containerRecreateRequests implements ContainerRecreateRequestInterface
type containerRecreateRequests struct { type containerRecreateRequests struct {
client rest.Interface *gentype.ClientWithList[*appsv1alpha1.ContainerRecreateRequest, *appsv1alpha1.ContainerRecreateRequestList]
ns string
} }
// newContainerRecreateRequests returns a ContainerRecreateRequests // newContainerRecreateRequests returns a ContainerRecreateRequests
func newContainerRecreateRequests(c *AppsV1alpha1Client, namespace string) *containerRecreateRequests { func newContainerRecreateRequests(c *AppsV1alpha1Client, namespace string) *containerRecreateRequests {
return &containerRecreateRequests{ return &containerRecreateRequests{
client: c.RESTClient(), gentype.NewClientWithList[*appsv1alpha1.ContainerRecreateRequest, *appsv1alpha1.ContainerRecreateRequestList](
ns: namespace, "containerrecreaterequests",
c.RESTClient(),
scheme.ParameterCodec,
namespace,
func() *appsv1alpha1.ContainerRecreateRequest { return &appsv1alpha1.ContainerRecreateRequest{} },
func() *appsv1alpha1.ContainerRecreateRequestList { return &appsv1alpha1.ContainerRecreateRequestList{} },
),
} }
} }
// Get takes name of the containerRecreateRequest, and returns the corresponding containerRecreateRequest object, and an error if there is any.
func (c *containerRecreateRequests) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.ContainerRecreateRequest, err error) {
result = &v1alpha1.ContainerRecreateRequest{}
err = c.client.Get().
Namespace(c.ns).
Resource("containerrecreaterequests").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of ContainerRecreateRequests that match those selectors.
func (c *containerRecreateRequests) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.ContainerRecreateRequestList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1alpha1.ContainerRecreateRequestList{}
err = c.client.Get().
Namespace(c.ns).
Resource("containerrecreaterequests").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested containerRecreateRequests.
func (c *containerRecreateRequests) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
Resource("containerrecreaterequests").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(ctx)
}
// Create takes the representation of a containerRecreateRequest and creates it. Returns the server's representation of the containerRecreateRequest, and an error, if there is any.
func (c *containerRecreateRequests) Create(ctx context.Context, containerRecreateRequest *v1alpha1.ContainerRecreateRequest, opts v1.CreateOptions) (result *v1alpha1.ContainerRecreateRequest, err error) {
result = &v1alpha1.ContainerRecreateRequest{}
err = c.client.Post().
Namespace(c.ns).
Resource("containerrecreaterequests").
VersionedParams(&opts, scheme.ParameterCodec).
Body(containerRecreateRequest).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a containerRecreateRequest and updates it. Returns the server's representation of the containerRecreateRequest, and an error, if there is any.
func (c *containerRecreateRequests) Update(ctx context.Context, containerRecreateRequest *v1alpha1.ContainerRecreateRequest, opts v1.UpdateOptions) (result *v1alpha1.ContainerRecreateRequest, err error) {
result = &v1alpha1.ContainerRecreateRequest{}
err = c.client.Put().
Namespace(c.ns).
Resource("containerrecreaterequests").
Name(containerRecreateRequest.Name).
VersionedParams(&opts, scheme.ParameterCodec).
Body(containerRecreateRequest).
Do(ctx).
Into(result)
return
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *containerRecreateRequests) UpdateStatus(ctx context.Context, containerRecreateRequest *v1alpha1.ContainerRecreateRequest, opts v1.UpdateOptions) (result *v1alpha1.ContainerRecreateRequest, err error) {
result = &v1alpha1.ContainerRecreateRequest{}
err = c.client.Put().
Namespace(c.ns).
Resource("containerrecreaterequests").
Name(containerRecreateRequest.Name).
SubResource("status").
VersionedParams(&opts, scheme.ParameterCodec).
Body(containerRecreateRequest).
Do(ctx).
Into(result)
return
}
// Delete takes name of the containerRecreateRequest and deletes it. Returns an error if one occurs.
func (c *containerRecreateRequests) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("containerrecreaterequests").
Name(name).
Body(&opts).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *containerRecreateRequests) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
var timeout time.Duration
if listOpts.TimeoutSeconds != nil {
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Namespace(c.ns).
Resource("containerrecreaterequests").
VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout).
Body(&opts).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched containerRecreateRequest.
func (c *containerRecreateRequests) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ContainerRecreateRequest, err error) {
result = &v1alpha1.ContainerRecreateRequest{}
err = c.client.Patch(pt).
Namespace(c.ns).
Resource("containerrecreaterequests").
Name(name).
SubResource(subresources...).
VersionedParams(&opts, scheme.ParameterCodec).
Body(data).
Do(ctx).
Into(result)
return
}

View File

@ -18,15 +18,14 @@ limitations under the License.
package v1alpha1 package v1alpha1
import ( import (
"context" context "context"
"time"
v1alpha1 "github.com/openkruise/kruise/apis/apps/v1alpha1" appsv1alpha1 "github.com/openkruise/kruise/apis/apps/v1alpha1"
scheme "github.com/openkruise/kruise/pkg/client/clientset/versioned/scheme" scheme "github.com/openkruise/kruise/pkg/client/clientset/versioned/scheme"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types" types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch" watch "k8s.io/apimachinery/pkg/watch"
rest "k8s.io/client-go/rest" gentype "k8s.io/client-go/gentype"
) )
// DaemonSetsGetter has a method to return a DaemonSetInterface. // DaemonSetsGetter has a method to return a DaemonSetInterface.
@ -37,158 +36,34 @@ type DaemonSetsGetter interface {
// DaemonSetInterface has methods to work with DaemonSet resources. // DaemonSetInterface has methods to work with DaemonSet resources.
type DaemonSetInterface interface { type DaemonSetInterface interface {
Create(ctx context.Context, daemonSet *v1alpha1.DaemonSet, opts v1.CreateOptions) (*v1alpha1.DaemonSet, error) Create(ctx context.Context, daemonSet *appsv1alpha1.DaemonSet, opts v1.CreateOptions) (*appsv1alpha1.DaemonSet, error)
Update(ctx context.Context, daemonSet *v1alpha1.DaemonSet, opts v1.UpdateOptions) (*v1alpha1.DaemonSet, error) Update(ctx context.Context, daemonSet *appsv1alpha1.DaemonSet, opts v1.UpdateOptions) (*appsv1alpha1.DaemonSet, error)
UpdateStatus(ctx context.Context, daemonSet *v1alpha1.DaemonSet, opts v1.UpdateOptions) (*v1alpha1.DaemonSet, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
UpdateStatus(ctx context.Context, daemonSet *appsv1alpha1.DaemonSet, opts v1.UpdateOptions) (*appsv1alpha1.DaemonSet, error)
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.DaemonSet, error) Get(ctx context.Context, name string, opts v1.GetOptions) (*appsv1alpha1.DaemonSet, error)
List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.DaemonSetList, error) List(ctx context.Context, opts v1.ListOptions) (*appsv1alpha1.DaemonSetList, error)
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.DaemonSet, err error) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *appsv1alpha1.DaemonSet, err error)
DaemonSetExpansion DaemonSetExpansion
} }
// daemonSets implements DaemonSetInterface // daemonSets implements DaemonSetInterface
type daemonSets struct { type daemonSets struct {
client rest.Interface *gentype.ClientWithList[*appsv1alpha1.DaemonSet, *appsv1alpha1.DaemonSetList]
ns string
} }
// newDaemonSets returns a DaemonSets // newDaemonSets returns a DaemonSets
func newDaemonSets(c *AppsV1alpha1Client, namespace string) *daemonSets { func newDaemonSets(c *AppsV1alpha1Client, namespace string) *daemonSets {
return &daemonSets{ return &daemonSets{
client: c.RESTClient(), gentype.NewClientWithList[*appsv1alpha1.DaemonSet, *appsv1alpha1.DaemonSetList](
ns: namespace, "daemonsets",
c.RESTClient(),
scheme.ParameterCodec,
namespace,
func() *appsv1alpha1.DaemonSet { return &appsv1alpha1.DaemonSet{} },
func() *appsv1alpha1.DaemonSetList { return &appsv1alpha1.DaemonSetList{} },
),
} }
} }
// Get takes name of the daemonSet, and returns the corresponding daemonSet object, and an error if there is any.
func (c *daemonSets) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.DaemonSet, err error) {
result = &v1alpha1.DaemonSet{}
err = c.client.Get().
Namespace(c.ns).
Resource("daemonsets").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of DaemonSets that match those selectors.
func (c *daemonSets) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.DaemonSetList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1alpha1.DaemonSetList{}
err = c.client.Get().
Namespace(c.ns).
Resource("daemonsets").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested daemonSets.
func (c *daemonSets) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
Resource("daemonsets").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(ctx)
}
// Create takes the representation of a daemonSet and creates it. Returns the server's representation of the daemonSet, and an error, if there is any.
func (c *daemonSets) Create(ctx context.Context, daemonSet *v1alpha1.DaemonSet, opts v1.CreateOptions) (result *v1alpha1.DaemonSet, err error) {
result = &v1alpha1.DaemonSet{}
err = c.client.Post().
Namespace(c.ns).
Resource("daemonsets").
VersionedParams(&opts, scheme.ParameterCodec).
Body(daemonSet).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a daemonSet and updates it. Returns the server's representation of the daemonSet, and an error, if there is any.
func (c *daemonSets) Update(ctx context.Context, daemonSet *v1alpha1.DaemonSet, opts v1.UpdateOptions) (result *v1alpha1.DaemonSet, err error) {
result = &v1alpha1.DaemonSet{}
err = c.client.Put().
Namespace(c.ns).
Resource("daemonsets").
Name(daemonSet.Name).
VersionedParams(&opts, scheme.ParameterCodec).
Body(daemonSet).
Do(ctx).
Into(result)
return
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *daemonSets) UpdateStatus(ctx context.Context, daemonSet *v1alpha1.DaemonSet, opts v1.UpdateOptions) (result *v1alpha1.DaemonSet, err error) {
result = &v1alpha1.DaemonSet{}
err = c.client.Put().
Namespace(c.ns).
Resource("daemonsets").
Name(daemonSet.Name).
SubResource("status").
VersionedParams(&opts, scheme.ParameterCodec).
Body(daemonSet).
Do(ctx).
Into(result)
return
}
// Delete takes name of the daemonSet and deletes it. Returns an error if one occurs.
func (c *daemonSets) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("daemonsets").
Name(name).
Body(&opts).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *daemonSets) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
var timeout time.Duration
if listOpts.TimeoutSeconds != nil {
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Namespace(c.ns).
Resource("daemonsets").
VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout).
Body(&opts).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched daemonSet.
func (c *daemonSets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.DaemonSet, err error) {
result = &v1alpha1.DaemonSet{}
err = c.client.Patch(pt).
Namespace(c.ns).
Resource("daemonsets").
Name(name).
SubResource(subresources...).
VersionedParams(&opts, scheme.ParameterCodec).
Body(data).
Do(ctx).
Into(result)
return
}

View File

@ -18,15 +18,14 @@ limitations under the License.
package v1alpha1 package v1alpha1
import ( import (
"context" context "context"
"time"
v1alpha1 "github.com/openkruise/kruise/apis/apps/v1alpha1" appsv1alpha1 "github.com/openkruise/kruise/apis/apps/v1alpha1"
scheme "github.com/openkruise/kruise/pkg/client/clientset/versioned/scheme" scheme "github.com/openkruise/kruise/pkg/client/clientset/versioned/scheme"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types" types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch" watch "k8s.io/apimachinery/pkg/watch"
rest "k8s.io/client-go/rest" gentype "k8s.io/client-go/gentype"
) )
// EphemeralJobsGetter has a method to return a EphemeralJobInterface. // EphemeralJobsGetter has a method to return a EphemeralJobInterface.
@ -37,158 +36,34 @@ type EphemeralJobsGetter interface {
// EphemeralJobInterface has methods to work with EphemeralJob resources. // EphemeralJobInterface has methods to work with EphemeralJob resources.
type EphemeralJobInterface interface { type EphemeralJobInterface interface {
Create(ctx context.Context, ephemeralJob *v1alpha1.EphemeralJob, opts v1.CreateOptions) (*v1alpha1.EphemeralJob, error) Create(ctx context.Context, ephemeralJob *appsv1alpha1.EphemeralJob, opts v1.CreateOptions) (*appsv1alpha1.EphemeralJob, error)
Update(ctx context.Context, ephemeralJob *v1alpha1.EphemeralJob, opts v1.UpdateOptions) (*v1alpha1.EphemeralJob, error) Update(ctx context.Context, ephemeralJob *appsv1alpha1.EphemeralJob, opts v1.UpdateOptions) (*appsv1alpha1.EphemeralJob, error)
UpdateStatus(ctx context.Context, ephemeralJob *v1alpha1.EphemeralJob, opts v1.UpdateOptions) (*v1alpha1.EphemeralJob, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
UpdateStatus(ctx context.Context, ephemeralJob *appsv1alpha1.EphemeralJob, opts v1.UpdateOptions) (*appsv1alpha1.EphemeralJob, error)
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.EphemeralJob, error) Get(ctx context.Context, name string, opts v1.GetOptions) (*appsv1alpha1.EphemeralJob, error)
List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.EphemeralJobList, error) List(ctx context.Context, opts v1.ListOptions) (*appsv1alpha1.EphemeralJobList, error)
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.EphemeralJob, err error) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *appsv1alpha1.EphemeralJob, err error)
EphemeralJobExpansion EphemeralJobExpansion
} }
// ephemeralJobs implements EphemeralJobInterface // ephemeralJobs implements EphemeralJobInterface
type ephemeralJobs struct { type ephemeralJobs struct {
client rest.Interface *gentype.ClientWithList[*appsv1alpha1.EphemeralJob, *appsv1alpha1.EphemeralJobList]
ns string
} }
// newEphemeralJobs returns a EphemeralJobs // newEphemeralJobs returns a EphemeralJobs
func newEphemeralJobs(c *AppsV1alpha1Client, namespace string) *ephemeralJobs { func newEphemeralJobs(c *AppsV1alpha1Client, namespace string) *ephemeralJobs {
return &ephemeralJobs{ return &ephemeralJobs{
client: c.RESTClient(), gentype.NewClientWithList[*appsv1alpha1.EphemeralJob, *appsv1alpha1.EphemeralJobList](
ns: namespace, "ephemeraljobs",
c.RESTClient(),
scheme.ParameterCodec,
namespace,
func() *appsv1alpha1.EphemeralJob { return &appsv1alpha1.EphemeralJob{} },
func() *appsv1alpha1.EphemeralJobList { return &appsv1alpha1.EphemeralJobList{} },
),
} }
} }
// Get takes name of the ephemeralJob, and returns the corresponding ephemeralJob object, and an error if there is any.
func (c *ephemeralJobs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.EphemeralJob, err error) {
result = &v1alpha1.EphemeralJob{}
err = c.client.Get().
Namespace(c.ns).
Resource("ephemeraljobs").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of EphemeralJobs that match those selectors.
func (c *ephemeralJobs) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.EphemeralJobList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1alpha1.EphemeralJobList{}
err = c.client.Get().
Namespace(c.ns).
Resource("ephemeraljobs").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested ephemeralJobs.
func (c *ephemeralJobs) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
Resource("ephemeraljobs").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(ctx)
}
// Create takes the representation of a ephemeralJob and creates it. Returns the server's representation of the ephemeralJob, and an error, if there is any.
func (c *ephemeralJobs) Create(ctx context.Context, ephemeralJob *v1alpha1.EphemeralJob, opts v1.CreateOptions) (result *v1alpha1.EphemeralJob, err error) {
result = &v1alpha1.EphemeralJob{}
err = c.client.Post().
Namespace(c.ns).
Resource("ephemeraljobs").
VersionedParams(&opts, scheme.ParameterCodec).
Body(ephemeralJob).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a ephemeralJob and updates it. Returns the server's representation of the ephemeralJob, and an error, if there is any.
func (c *ephemeralJobs) Update(ctx context.Context, ephemeralJob *v1alpha1.EphemeralJob, opts v1.UpdateOptions) (result *v1alpha1.EphemeralJob, err error) {
result = &v1alpha1.EphemeralJob{}
err = c.client.Put().
Namespace(c.ns).
Resource("ephemeraljobs").
Name(ephemeralJob.Name).
VersionedParams(&opts, scheme.ParameterCodec).
Body(ephemeralJob).
Do(ctx).
Into(result)
return
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *ephemeralJobs) UpdateStatus(ctx context.Context, ephemeralJob *v1alpha1.EphemeralJob, opts v1.UpdateOptions) (result *v1alpha1.EphemeralJob, err error) {
result = &v1alpha1.EphemeralJob{}
err = c.client.Put().
Namespace(c.ns).
Resource("ephemeraljobs").
Name(ephemeralJob.Name).
SubResource("status").
VersionedParams(&opts, scheme.ParameterCodec).
Body(ephemeralJob).
Do(ctx).
Into(result)
return
}
// Delete takes name of the ephemeralJob and deletes it. Returns an error if one occurs.
func (c *ephemeralJobs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("ephemeraljobs").
Name(name).
Body(&opts).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *ephemeralJobs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
var timeout time.Duration
if listOpts.TimeoutSeconds != nil {
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Namespace(c.ns).
Resource("ephemeraljobs").
VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout).
Body(&opts).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched ephemeralJob.
func (c *ephemeralJobs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.EphemeralJob, err error) {
result = &v1alpha1.EphemeralJob{}
err = c.client.Patch(pt).
Namespace(c.ns).
Resource("ephemeraljobs").
Name(name).
SubResource(subresources...).
VersionedParams(&opts, scheme.ParameterCodec).
Body(data).
Do(ctx).
Into(result)
return
}

View File

@ -18,123 +18,34 @@ limitations under the License.
package fake package fake
import ( import (
"context"
v1alpha1 "github.com/openkruise/kruise/apis/apps/v1alpha1" v1alpha1 "github.com/openkruise/kruise/apis/apps/v1alpha1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1" appsv1alpha1 "github.com/openkruise/kruise/pkg/client/clientset/versioned/typed/apps/v1alpha1"
labels "k8s.io/apimachinery/pkg/labels" gentype "k8s.io/client-go/gentype"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
testing "k8s.io/client-go/testing"
) )
// FakeAdvancedCronJobs implements AdvancedCronJobInterface // fakeAdvancedCronJobs implements AdvancedCronJobInterface
type FakeAdvancedCronJobs struct { type fakeAdvancedCronJobs struct {
*gentype.FakeClientWithList[*v1alpha1.AdvancedCronJob, *v1alpha1.AdvancedCronJobList]
Fake *FakeAppsV1alpha1 Fake *FakeAppsV1alpha1
ns string
} }
var advancedcronjobsResource = v1alpha1.SchemeGroupVersion.WithResource("advancedcronjobs") func newFakeAdvancedCronJobs(fake *FakeAppsV1alpha1, namespace string) appsv1alpha1.AdvancedCronJobInterface {
return &fakeAdvancedCronJobs{
var advancedcronjobsKind = v1alpha1.SchemeGroupVersion.WithKind("AdvancedCronJob") gentype.NewFakeClientWithList[*v1alpha1.AdvancedCronJob, *v1alpha1.AdvancedCronJobList](
fake.Fake,
// Get takes name of the advancedCronJob, and returns the corresponding advancedCronJob object, and an error if there is any. namespace,
func (c *FakeAdvancedCronJobs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.AdvancedCronJob, err error) { v1alpha1.SchemeGroupVersion.WithResource("advancedcronjobs"),
obj, err := c.Fake. v1alpha1.SchemeGroupVersion.WithKind("AdvancedCronJob"),
Invokes(testing.NewGetAction(advancedcronjobsResource, c.ns, name), &v1alpha1.AdvancedCronJob{}) func() *v1alpha1.AdvancedCronJob { return &v1alpha1.AdvancedCronJob{} },
func() *v1alpha1.AdvancedCronJobList { return &v1alpha1.AdvancedCronJobList{} },
if obj == nil { func(dst, src *v1alpha1.AdvancedCronJobList) { dst.ListMeta = src.ListMeta },
return nil, err func(list *v1alpha1.AdvancedCronJobList) []*v1alpha1.AdvancedCronJob {
return gentype.ToPointerSlice(list.Items)
},
func(list *v1alpha1.AdvancedCronJobList, items []*v1alpha1.AdvancedCronJob) {
list.Items = gentype.FromPointerSlice(items)
},
),
fake,
} }
return obj.(*v1alpha1.AdvancedCronJob), err
}
// List takes label and field selectors, and returns the list of AdvancedCronJobs that match those selectors.
func (c *FakeAdvancedCronJobs) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.AdvancedCronJobList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(advancedcronjobsResource, advancedcronjobsKind, c.ns, opts), &v1alpha1.AdvancedCronJobList{})
if obj == nil {
return nil, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
if label == nil {
label = labels.Everything()
}
list := &v1alpha1.AdvancedCronJobList{ListMeta: obj.(*v1alpha1.AdvancedCronJobList).ListMeta}
for _, item := range obj.(*v1alpha1.AdvancedCronJobList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
}
return list, err
}
// Watch returns a watch.Interface that watches the requested advancedCronJobs.
func (c *FakeAdvancedCronJobs) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(advancedcronjobsResource, c.ns, opts))
}
// Create takes the representation of a advancedCronJob and creates it. Returns the server's representation of the advancedCronJob, and an error, if there is any.
func (c *FakeAdvancedCronJobs) Create(ctx context.Context, advancedCronJob *v1alpha1.AdvancedCronJob, opts v1.CreateOptions) (result *v1alpha1.AdvancedCronJob, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(advancedcronjobsResource, c.ns, advancedCronJob), &v1alpha1.AdvancedCronJob{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.AdvancedCronJob), err
}
// Update takes the representation of a advancedCronJob and updates it. Returns the server's representation of the advancedCronJob, and an error, if there is any.
func (c *FakeAdvancedCronJobs) Update(ctx context.Context, advancedCronJob *v1alpha1.AdvancedCronJob, opts v1.UpdateOptions) (result *v1alpha1.AdvancedCronJob, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(advancedcronjobsResource, c.ns, advancedCronJob), &v1alpha1.AdvancedCronJob{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.AdvancedCronJob), err
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *FakeAdvancedCronJobs) UpdateStatus(ctx context.Context, advancedCronJob *v1alpha1.AdvancedCronJob, opts v1.UpdateOptions) (*v1alpha1.AdvancedCronJob, error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(advancedcronjobsResource, "status", c.ns, advancedCronJob), &v1alpha1.AdvancedCronJob{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.AdvancedCronJob), err
}
// Delete takes name of the advancedCronJob and deletes it. Returns an error if one occurs.
func (c *FakeAdvancedCronJobs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteActionWithOptions(advancedcronjobsResource, c.ns, name, opts), &v1alpha1.AdvancedCronJob{})
return err
}
// DeleteCollection deletes a collection of objects.
func (c *FakeAdvancedCronJobs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(advancedcronjobsResource, c.ns, listOpts)
_, err := c.Fake.Invokes(action, &v1alpha1.AdvancedCronJobList{})
return err
}
// Patch applies the patch and returns the patched advancedCronJob.
func (c *FakeAdvancedCronJobs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.AdvancedCronJob, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(advancedcronjobsResource, c.ns, name, pt, data, subresources...), &v1alpha1.AdvancedCronJob{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.AdvancedCronJob), err
} }

View File

@ -28,71 +28,71 @@ type FakeAppsV1alpha1 struct {
} }
func (c *FakeAppsV1alpha1) AdvancedCronJobs(namespace string) v1alpha1.AdvancedCronJobInterface { func (c *FakeAppsV1alpha1) AdvancedCronJobs(namespace string) v1alpha1.AdvancedCronJobInterface {
return &FakeAdvancedCronJobs{c, namespace} return newFakeAdvancedCronJobs(c, namespace)
} }
func (c *FakeAppsV1alpha1) BroadcastJobs(namespace string) v1alpha1.BroadcastJobInterface { func (c *FakeAppsV1alpha1) BroadcastJobs(namespace string) v1alpha1.BroadcastJobInterface {
return &FakeBroadcastJobs{c, namespace} return newFakeBroadcastJobs(c, namespace)
} }
func (c *FakeAppsV1alpha1) CloneSets(namespace string) v1alpha1.CloneSetInterface { func (c *FakeAppsV1alpha1) CloneSets(namespace string) v1alpha1.CloneSetInterface {
return &FakeCloneSets{c, namespace} return newFakeCloneSets(c, namespace)
} }
func (c *FakeAppsV1alpha1) ContainerRecreateRequests(namespace string) v1alpha1.ContainerRecreateRequestInterface { func (c *FakeAppsV1alpha1) ContainerRecreateRequests(namespace string) v1alpha1.ContainerRecreateRequestInterface {
return &FakeContainerRecreateRequests{c, namespace} return newFakeContainerRecreateRequests(c, namespace)
} }
func (c *FakeAppsV1alpha1) DaemonSets(namespace string) v1alpha1.DaemonSetInterface { func (c *FakeAppsV1alpha1) DaemonSets(namespace string) v1alpha1.DaemonSetInterface {
return &FakeDaemonSets{c, namespace} return newFakeDaemonSets(c, namespace)
} }
func (c *FakeAppsV1alpha1) EphemeralJobs(namespace string) v1alpha1.EphemeralJobInterface { func (c *FakeAppsV1alpha1) EphemeralJobs(namespace string) v1alpha1.EphemeralJobInterface {
return &FakeEphemeralJobs{c, namespace} return newFakeEphemeralJobs(c, namespace)
} }
func (c *FakeAppsV1alpha1) ImageListPullJobs(namespace string) v1alpha1.ImageListPullJobInterface { func (c *FakeAppsV1alpha1) ImageListPullJobs(namespace string) v1alpha1.ImageListPullJobInterface {
return &FakeImageListPullJobs{c, namespace} return newFakeImageListPullJobs(c, namespace)
} }
func (c *FakeAppsV1alpha1) ImagePullJobs(namespace string) v1alpha1.ImagePullJobInterface { func (c *FakeAppsV1alpha1) ImagePullJobs(namespace string) v1alpha1.ImagePullJobInterface {
return &FakeImagePullJobs{c, namespace} return newFakeImagePullJobs(c, namespace)
} }
func (c *FakeAppsV1alpha1) NodeImages() v1alpha1.NodeImageInterface { func (c *FakeAppsV1alpha1) NodeImages() v1alpha1.NodeImageInterface {
return &FakeNodeImages{c} return newFakeNodeImages(c)
} }
func (c *FakeAppsV1alpha1) NodePodProbes() v1alpha1.NodePodProbeInterface { func (c *FakeAppsV1alpha1) NodePodProbes() v1alpha1.NodePodProbeInterface {
return &FakeNodePodProbes{c} return newFakeNodePodProbes(c)
} }
func (c *FakeAppsV1alpha1) PersistentPodStates(namespace string) v1alpha1.PersistentPodStateInterface { func (c *FakeAppsV1alpha1) PersistentPodStates(namespace string) v1alpha1.PersistentPodStateInterface {
return &FakePersistentPodStates{c, namespace} return newFakePersistentPodStates(c, namespace)
} }
func (c *FakeAppsV1alpha1) PodProbeMarkers(namespace string) v1alpha1.PodProbeMarkerInterface { func (c *FakeAppsV1alpha1) PodProbeMarkers(namespace string) v1alpha1.PodProbeMarkerInterface {
return &FakePodProbeMarkers{c, namespace} return newFakePodProbeMarkers(c, namespace)
} }
func (c *FakeAppsV1alpha1) ResourceDistributions() v1alpha1.ResourceDistributionInterface { func (c *FakeAppsV1alpha1) ResourceDistributions() v1alpha1.ResourceDistributionInterface {
return &FakeResourceDistributions{c} return newFakeResourceDistributions(c)
} }
func (c *FakeAppsV1alpha1) SidecarSets() v1alpha1.SidecarSetInterface { func (c *FakeAppsV1alpha1) SidecarSets() v1alpha1.SidecarSetInterface {
return &FakeSidecarSets{c} return newFakeSidecarSets(c)
} }
func (c *FakeAppsV1alpha1) StatefulSets(namespace string) v1alpha1.StatefulSetInterface { func (c *FakeAppsV1alpha1) StatefulSets(namespace string) v1alpha1.StatefulSetInterface {
return &FakeStatefulSets{c, namespace} return newFakeStatefulSets(c, namespace)
} }
func (c *FakeAppsV1alpha1) UnitedDeployments(namespace string) v1alpha1.UnitedDeploymentInterface { func (c *FakeAppsV1alpha1) UnitedDeployments(namespace string) v1alpha1.UnitedDeploymentInterface {
return &FakeUnitedDeployments{c, namespace} return newFakeUnitedDeployments(c, namespace)
} }
func (c *FakeAppsV1alpha1) WorkloadSpreads(namespace string) v1alpha1.WorkloadSpreadInterface { func (c *FakeAppsV1alpha1) WorkloadSpreads(namespace string) v1alpha1.WorkloadSpreadInterface {
return &FakeWorkloadSpreads{c, namespace} return newFakeWorkloadSpreads(c, namespace)
} }
// RESTClient returns a RESTClient that is used to communicate // RESTClient returns a RESTClient that is used to communicate

View File

@ -18,123 +18,34 @@ limitations under the License.
package fake package fake
import ( import (
"context"
v1alpha1 "github.com/openkruise/kruise/apis/apps/v1alpha1" v1alpha1 "github.com/openkruise/kruise/apis/apps/v1alpha1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1" appsv1alpha1 "github.com/openkruise/kruise/pkg/client/clientset/versioned/typed/apps/v1alpha1"
labels "k8s.io/apimachinery/pkg/labels" gentype "k8s.io/client-go/gentype"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
testing "k8s.io/client-go/testing"
) )
// FakeBroadcastJobs implements BroadcastJobInterface // fakeBroadcastJobs implements BroadcastJobInterface
type FakeBroadcastJobs struct { type fakeBroadcastJobs struct {
*gentype.FakeClientWithList[*v1alpha1.BroadcastJob, *v1alpha1.BroadcastJobList]
Fake *FakeAppsV1alpha1 Fake *FakeAppsV1alpha1
ns string
} }
var broadcastjobsResource = v1alpha1.SchemeGroupVersion.WithResource("broadcastjobs") func newFakeBroadcastJobs(fake *FakeAppsV1alpha1, namespace string) appsv1alpha1.BroadcastJobInterface {
return &fakeBroadcastJobs{
var broadcastjobsKind = v1alpha1.SchemeGroupVersion.WithKind("BroadcastJob") gentype.NewFakeClientWithList[*v1alpha1.BroadcastJob, *v1alpha1.BroadcastJobList](
fake.Fake,
// Get takes name of the broadcastJob, and returns the corresponding broadcastJob object, and an error if there is any. namespace,
func (c *FakeBroadcastJobs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.BroadcastJob, err error) { v1alpha1.SchemeGroupVersion.WithResource("broadcastjobs"),
obj, err := c.Fake. v1alpha1.SchemeGroupVersion.WithKind("BroadcastJob"),
Invokes(testing.NewGetAction(broadcastjobsResource, c.ns, name), &v1alpha1.BroadcastJob{}) func() *v1alpha1.BroadcastJob { return &v1alpha1.BroadcastJob{} },
func() *v1alpha1.BroadcastJobList { return &v1alpha1.BroadcastJobList{} },
if obj == nil { func(dst, src *v1alpha1.BroadcastJobList) { dst.ListMeta = src.ListMeta },
return nil, err func(list *v1alpha1.BroadcastJobList) []*v1alpha1.BroadcastJob {
return gentype.ToPointerSlice(list.Items)
},
func(list *v1alpha1.BroadcastJobList, items []*v1alpha1.BroadcastJob) {
list.Items = gentype.FromPointerSlice(items)
},
),
fake,
} }
return obj.(*v1alpha1.BroadcastJob), err
}
// List takes label and field selectors, and returns the list of BroadcastJobs that match those selectors.
func (c *FakeBroadcastJobs) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.BroadcastJobList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(broadcastjobsResource, broadcastjobsKind, c.ns, opts), &v1alpha1.BroadcastJobList{})
if obj == nil {
return nil, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
if label == nil {
label = labels.Everything()
}
list := &v1alpha1.BroadcastJobList{ListMeta: obj.(*v1alpha1.BroadcastJobList).ListMeta}
for _, item := range obj.(*v1alpha1.BroadcastJobList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
}
return list, err
}
// Watch returns a watch.Interface that watches the requested broadcastJobs.
func (c *FakeBroadcastJobs) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(broadcastjobsResource, c.ns, opts))
}
// Create takes the representation of a broadcastJob and creates it. Returns the server's representation of the broadcastJob, and an error, if there is any.
func (c *FakeBroadcastJobs) Create(ctx context.Context, broadcastJob *v1alpha1.BroadcastJob, opts v1.CreateOptions) (result *v1alpha1.BroadcastJob, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(broadcastjobsResource, c.ns, broadcastJob), &v1alpha1.BroadcastJob{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.BroadcastJob), err
}
// Update takes the representation of a broadcastJob and updates it. Returns the server's representation of the broadcastJob, and an error, if there is any.
func (c *FakeBroadcastJobs) Update(ctx context.Context, broadcastJob *v1alpha1.BroadcastJob, opts v1.UpdateOptions) (result *v1alpha1.BroadcastJob, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(broadcastjobsResource, c.ns, broadcastJob), &v1alpha1.BroadcastJob{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.BroadcastJob), err
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *FakeBroadcastJobs) UpdateStatus(ctx context.Context, broadcastJob *v1alpha1.BroadcastJob, opts v1.UpdateOptions) (*v1alpha1.BroadcastJob, error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(broadcastjobsResource, "status", c.ns, broadcastJob), &v1alpha1.BroadcastJob{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.BroadcastJob), err
}
// Delete takes name of the broadcastJob and deletes it. Returns an error if one occurs.
func (c *FakeBroadcastJobs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteActionWithOptions(broadcastjobsResource, c.ns, name, opts), &v1alpha1.BroadcastJob{})
return err
}
// DeleteCollection deletes a collection of objects.
func (c *FakeBroadcastJobs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(broadcastjobsResource, c.ns, listOpts)
_, err := c.Fake.Invokes(action, &v1alpha1.BroadcastJobList{})
return err
}
// Patch applies the patch and returns the patched broadcastJob.
func (c *FakeBroadcastJobs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.BroadcastJob, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(broadcastjobsResource, c.ns, name, pt, data, subresources...), &v1alpha1.BroadcastJob{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.BroadcastJob), err
} }

View File

@ -18,146 +18,61 @@ limitations under the License.
package fake package fake
import ( import (
"context" context "context"
v1alpha1 "github.com/openkruise/kruise/apis/apps/v1alpha1" v1alpha1 "github.com/openkruise/kruise/apis/apps/v1alpha1"
appsv1alpha1 "github.com/openkruise/kruise/pkg/client/clientset/versioned/typed/apps/v1alpha1"
autoscalingv1 "k8s.io/api/autoscaling/v1" autoscalingv1 "k8s.io/api/autoscaling/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels" gentype "k8s.io/client-go/gentype"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
testing "k8s.io/client-go/testing" testing "k8s.io/client-go/testing"
) )
// FakeCloneSets implements CloneSetInterface // fakeCloneSets implements CloneSetInterface
type FakeCloneSets struct { type fakeCloneSets struct {
*gentype.FakeClientWithList[*v1alpha1.CloneSet, *v1alpha1.CloneSetList]
Fake *FakeAppsV1alpha1 Fake *FakeAppsV1alpha1
ns string
} }
var clonesetsResource = v1alpha1.SchemeGroupVersion.WithResource("clonesets") func newFakeCloneSets(fake *FakeAppsV1alpha1, namespace string) appsv1alpha1.CloneSetInterface {
return &fakeCloneSets{
var clonesetsKind = v1alpha1.SchemeGroupVersion.WithKind("CloneSet") gentype.NewFakeClientWithList[*v1alpha1.CloneSet, *v1alpha1.CloneSetList](
fake.Fake,
// Get takes name of the cloneSet, and returns the corresponding cloneSet object, and an error if there is any. namespace,
func (c *FakeCloneSets) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.CloneSet, err error) { v1alpha1.SchemeGroupVersion.WithResource("clonesets"),
obj, err := c.Fake. v1alpha1.SchemeGroupVersion.WithKind("CloneSet"),
Invokes(testing.NewGetAction(clonesetsResource, c.ns, name), &v1alpha1.CloneSet{}) func() *v1alpha1.CloneSet { return &v1alpha1.CloneSet{} },
func() *v1alpha1.CloneSetList { return &v1alpha1.CloneSetList{} },
if obj == nil { func(dst, src *v1alpha1.CloneSetList) { dst.ListMeta = src.ListMeta },
return nil, err func(list *v1alpha1.CloneSetList) []*v1alpha1.CloneSet { return gentype.ToPointerSlice(list.Items) },
func(list *v1alpha1.CloneSetList, items []*v1alpha1.CloneSet) {
list.Items = gentype.FromPointerSlice(items)
},
),
fake,
} }
return obj.(*v1alpha1.CloneSet), err
}
// List takes label and field selectors, and returns the list of CloneSets that match those selectors.
func (c *FakeCloneSets) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.CloneSetList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(clonesetsResource, clonesetsKind, c.ns, opts), &v1alpha1.CloneSetList{})
if obj == nil {
return nil, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
if label == nil {
label = labels.Everything()
}
list := &v1alpha1.CloneSetList{ListMeta: obj.(*v1alpha1.CloneSetList).ListMeta}
for _, item := range obj.(*v1alpha1.CloneSetList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
}
return list, err
}
// Watch returns a watch.Interface that watches the requested cloneSets.
func (c *FakeCloneSets) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(clonesetsResource, c.ns, opts))
}
// Create takes the representation of a cloneSet and creates it. Returns the server's representation of the cloneSet, and an error, if there is any.
func (c *FakeCloneSets) Create(ctx context.Context, cloneSet *v1alpha1.CloneSet, opts v1.CreateOptions) (result *v1alpha1.CloneSet, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(clonesetsResource, c.ns, cloneSet), &v1alpha1.CloneSet{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.CloneSet), err
}
// Update takes the representation of a cloneSet and updates it. Returns the server's representation of the cloneSet, and an error, if there is any.
func (c *FakeCloneSets) Update(ctx context.Context, cloneSet *v1alpha1.CloneSet, opts v1.UpdateOptions) (result *v1alpha1.CloneSet, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(clonesetsResource, c.ns, cloneSet), &v1alpha1.CloneSet{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.CloneSet), err
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *FakeCloneSets) UpdateStatus(ctx context.Context, cloneSet *v1alpha1.CloneSet, opts v1.UpdateOptions) (*v1alpha1.CloneSet, error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(clonesetsResource, "status", c.ns, cloneSet), &v1alpha1.CloneSet{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.CloneSet), err
}
// Delete takes name of the cloneSet and deletes it. Returns an error if one occurs.
func (c *FakeCloneSets) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteActionWithOptions(clonesetsResource, c.ns, name, opts), &v1alpha1.CloneSet{})
return err
}
// DeleteCollection deletes a collection of objects.
func (c *FakeCloneSets) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(clonesetsResource, c.ns, listOpts)
_, err := c.Fake.Invokes(action, &v1alpha1.CloneSetList{})
return err
}
// Patch applies the patch and returns the patched cloneSet.
func (c *FakeCloneSets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.CloneSet, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(clonesetsResource, c.ns, name, pt, data, subresources...), &v1alpha1.CloneSet{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.CloneSet), err
} }
// GetScale takes name of the cloneSet, and returns the corresponding scale object, and an error if there is any. // GetScale takes name of the cloneSet, and returns the corresponding scale object, and an error if there is any.
func (c *FakeCloneSets) GetScale(ctx context.Context, cloneSetName string, options v1.GetOptions) (result *autoscalingv1.Scale, err error) { func (c *fakeCloneSets) GetScale(ctx context.Context, cloneSetName string, options v1.GetOptions) (result *autoscalingv1.Scale, err error) {
emptyResult := &autoscalingv1.Scale{}
obj, err := c.Fake. obj, err := c.Fake.
Invokes(testing.NewGetSubresourceAction(clonesetsResource, c.ns, "scale", cloneSetName), &autoscalingv1.Scale{}) Invokes(testing.NewGetSubresourceActionWithOptions(c.Resource(), c.Namespace(), "scale", cloneSetName, options), emptyResult)
if obj == nil { if obj == nil {
return nil, err return emptyResult, err
} }
return obj.(*autoscalingv1.Scale), err return obj.(*autoscalingv1.Scale), err
} }
// UpdateScale takes the representation of a scale and updates it. Returns the server's representation of the scale, and an error, if there is any. // UpdateScale takes the representation of a scale and updates it. Returns the server's representation of the scale, and an error, if there is any.
func (c *FakeCloneSets) UpdateScale(ctx context.Context, cloneSetName string, scale *autoscalingv1.Scale, opts v1.UpdateOptions) (result *autoscalingv1.Scale, err error) { func (c *fakeCloneSets) UpdateScale(ctx context.Context, cloneSetName string, scale *autoscalingv1.Scale, opts v1.UpdateOptions) (result *autoscalingv1.Scale, err error) {
emptyResult := &autoscalingv1.Scale{}
obj, err := c.Fake. obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(clonesetsResource, "scale", c.ns, scale), &autoscalingv1.Scale{}) Invokes(testing.NewUpdateSubresourceActionWithOptions(c.Resource(), "scale", c.Namespace(), scale, opts), &autoscalingv1.Scale{})
if obj == nil { if obj == nil {
return nil, err return emptyResult, err
} }
return obj.(*autoscalingv1.Scale), err return obj.(*autoscalingv1.Scale), err
} }

View File

@ -18,123 +18,34 @@ limitations under the License.
package fake package fake
import ( import (
"context"
v1alpha1 "github.com/openkruise/kruise/apis/apps/v1alpha1" v1alpha1 "github.com/openkruise/kruise/apis/apps/v1alpha1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1" appsv1alpha1 "github.com/openkruise/kruise/pkg/client/clientset/versioned/typed/apps/v1alpha1"
labels "k8s.io/apimachinery/pkg/labels" gentype "k8s.io/client-go/gentype"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
testing "k8s.io/client-go/testing"
) )
// FakeContainerRecreateRequests implements ContainerRecreateRequestInterface // fakeContainerRecreateRequests implements ContainerRecreateRequestInterface
type FakeContainerRecreateRequests struct { type fakeContainerRecreateRequests struct {
*gentype.FakeClientWithList[*v1alpha1.ContainerRecreateRequest, *v1alpha1.ContainerRecreateRequestList]
Fake *FakeAppsV1alpha1 Fake *FakeAppsV1alpha1
ns string
} }
var containerrecreaterequestsResource = v1alpha1.SchemeGroupVersion.WithResource("containerrecreaterequests") func newFakeContainerRecreateRequests(fake *FakeAppsV1alpha1, namespace string) appsv1alpha1.ContainerRecreateRequestInterface {
return &fakeContainerRecreateRequests{
var containerrecreaterequestsKind = v1alpha1.SchemeGroupVersion.WithKind("ContainerRecreateRequest") gentype.NewFakeClientWithList[*v1alpha1.ContainerRecreateRequest, *v1alpha1.ContainerRecreateRequestList](
fake.Fake,
// Get takes name of the containerRecreateRequest, and returns the corresponding containerRecreateRequest object, and an error if there is any. namespace,
func (c *FakeContainerRecreateRequests) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.ContainerRecreateRequest, err error) { v1alpha1.SchemeGroupVersion.WithResource("containerrecreaterequests"),
obj, err := c.Fake. v1alpha1.SchemeGroupVersion.WithKind("ContainerRecreateRequest"),
Invokes(testing.NewGetAction(containerrecreaterequestsResource, c.ns, name), &v1alpha1.ContainerRecreateRequest{}) func() *v1alpha1.ContainerRecreateRequest { return &v1alpha1.ContainerRecreateRequest{} },
func() *v1alpha1.ContainerRecreateRequestList { return &v1alpha1.ContainerRecreateRequestList{} },
if obj == nil { func(dst, src *v1alpha1.ContainerRecreateRequestList) { dst.ListMeta = src.ListMeta },
return nil, err func(list *v1alpha1.ContainerRecreateRequestList) []*v1alpha1.ContainerRecreateRequest {
return gentype.ToPointerSlice(list.Items)
},
func(list *v1alpha1.ContainerRecreateRequestList, items []*v1alpha1.ContainerRecreateRequest) {
list.Items = gentype.FromPointerSlice(items)
},
),
fake,
} }
return obj.(*v1alpha1.ContainerRecreateRequest), err
}
// List takes label and field selectors, and returns the list of ContainerRecreateRequests that match those selectors.
func (c *FakeContainerRecreateRequests) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.ContainerRecreateRequestList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(containerrecreaterequestsResource, containerrecreaterequestsKind, c.ns, opts), &v1alpha1.ContainerRecreateRequestList{})
if obj == nil {
return nil, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
if label == nil {
label = labels.Everything()
}
list := &v1alpha1.ContainerRecreateRequestList{ListMeta: obj.(*v1alpha1.ContainerRecreateRequestList).ListMeta}
for _, item := range obj.(*v1alpha1.ContainerRecreateRequestList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
}
return list, err
}
// Watch returns a watch.Interface that watches the requested containerRecreateRequests.
func (c *FakeContainerRecreateRequests) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(containerrecreaterequestsResource, c.ns, opts))
}
// Create takes the representation of a containerRecreateRequest and creates it. Returns the server's representation of the containerRecreateRequest, and an error, if there is any.
func (c *FakeContainerRecreateRequests) Create(ctx context.Context, containerRecreateRequest *v1alpha1.ContainerRecreateRequest, opts v1.CreateOptions) (result *v1alpha1.ContainerRecreateRequest, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(containerrecreaterequestsResource, c.ns, containerRecreateRequest), &v1alpha1.ContainerRecreateRequest{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.ContainerRecreateRequest), err
}
// Update takes the representation of a containerRecreateRequest and updates it. Returns the server's representation of the containerRecreateRequest, and an error, if there is any.
func (c *FakeContainerRecreateRequests) Update(ctx context.Context, containerRecreateRequest *v1alpha1.ContainerRecreateRequest, opts v1.UpdateOptions) (result *v1alpha1.ContainerRecreateRequest, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(containerrecreaterequestsResource, c.ns, containerRecreateRequest), &v1alpha1.ContainerRecreateRequest{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.ContainerRecreateRequest), err
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *FakeContainerRecreateRequests) UpdateStatus(ctx context.Context, containerRecreateRequest *v1alpha1.ContainerRecreateRequest, opts v1.UpdateOptions) (*v1alpha1.ContainerRecreateRequest, error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(containerrecreaterequestsResource, "status", c.ns, containerRecreateRequest), &v1alpha1.ContainerRecreateRequest{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.ContainerRecreateRequest), err
}
// Delete takes name of the containerRecreateRequest and deletes it. Returns an error if one occurs.
func (c *FakeContainerRecreateRequests) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteActionWithOptions(containerrecreaterequestsResource, c.ns, name, opts), &v1alpha1.ContainerRecreateRequest{})
return err
}
// DeleteCollection deletes a collection of objects.
func (c *FakeContainerRecreateRequests) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(containerrecreaterequestsResource, c.ns, listOpts)
_, err := c.Fake.Invokes(action, &v1alpha1.ContainerRecreateRequestList{})
return err
}
// Patch applies the patch and returns the patched containerRecreateRequest.
func (c *FakeContainerRecreateRequests) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ContainerRecreateRequest, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(containerrecreaterequestsResource, c.ns, name, pt, data, subresources...), &v1alpha1.ContainerRecreateRequest{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.ContainerRecreateRequest), err
} }

View File

@ -18,123 +18,32 @@ limitations under the License.
package fake package fake
import ( import (
"context"
v1alpha1 "github.com/openkruise/kruise/apis/apps/v1alpha1" v1alpha1 "github.com/openkruise/kruise/apis/apps/v1alpha1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1" appsv1alpha1 "github.com/openkruise/kruise/pkg/client/clientset/versioned/typed/apps/v1alpha1"
labels "k8s.io/apimachinery/pkg/labels" gentype "k8s.io/client-go/gentype"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
testing "k8s.io/client-go/testing"
) )
// FakeDaemonSets implements DaemonSetInterface // fakeDaemonSets implements DaemonSetInterface
type FakeDaemonSets struct { type fakeDaemonSets struct {
*gentype.FakeClientWithList[*v1alpha1.DaemonSet, *v1alpha1.DaemonSetList]
Fake *FakeAppsV1alpha1 Fake *FakeAppsV1alpha1
ns string
} }
var daemonsetsResource = v1alpha1.SchemeGroupVersion.WithResource("daemonsets") func newFakeDaemonSets(fake *FakeAppsV1alpha1, namespace string) appsv1alpha1.DaemonSetInterface {
return &fakeDaemonSets{
var daemonsetsKind = v1alpha1.SchemeGroupVersion.WithKind("DaemonSet") gentype.NewFakeClientWithList[*v1alpha1.DaemonSet, *v1alpha1.DaemonSetList](
fake.Fake,
// Get takes name of the daemonSet, and returns the corresponding daemonSet object, and an error if there is any. namespace,
func (c *FakeDaemonSets) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.DaemonSet, err error) { v1alpha1.SchemeGroupVersion.WithResource("daemonsets"),
obj, err := c.Fake. v1alpha1.SchemeGroupVersion.WithKind("DaemonSet"),
Invokes(testing.NewGetAction(daemonsetsResource, c.ns, name), &v1alpha1.DaemonSet{}) func() *v1alpha1.DaemonSet { return &v1alpha1.DaemonSet{} },
func() *v1alpha1.DaemonSetList { return &v1alpha1.DaemonSetList{} },
if obj == nil { func(dst, src *v1alpha1.DaemonSetList) { dst.ListMeta = src.ListMeta },
return nil, err func(list *v1alpha1.DaemonSetList) []*v1alpha1.DaemonSet { return gentype.ToPointerSlice(list.Items) },
func(list *v1alpha1.DaemonSetList, items []*v1alpha1.DaemonSet) {
list.Items = gentype.FromPointerSlice(items)
},
),
fake,
} }
return obj.(*v1alpha1.DaemonSet), err
}
// List takes label and field selectors, and returns the list of DaemonSets that match those selectors.
func (c *FakeDaemonSets) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.DaemonSetList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(daemonsetsResource, daemonsetsKind, c.ns, opts), &v1alpha1.DaemonSetList{})
if obj == nil {
return nil, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
if label == nil {
label = labels.Everything()
}
list := &v1alpha1.DaemonSetList{ListMeta: obj.(*v1alpha1.DaemonSetList).ListMeta}
for _, item := range obj.(*v1alpha1.DaemonSetList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
}
return list, err
}
// Watch returns a watch.Interface that watches the requested daemonSets.
func (c *FakeDaemonSets) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(daemonsetsResource, c.ns, opts))
}
// Create takes the representation of a daemonSet and creates it. Returns the server's representation of the daemonSet, and an error, if there is any.
func (c *FakeDaemonSets) Create(ctx context.Context, daemonSet *v1alpha1.DaemonSet, opts v1.CreateOptions) (result *v1alpha1.DaemonSet, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(daemonsetsResource, c.ns, daemonSet), &v1alpha1.DaemonSet{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.DaemonSet), err
}
// Update takes the representation of a daemonSet and updates it. Returns the server's representation of the daemonSet, and an error, if there is any.
func (c *FakeDaemonSets) Update(ctx context.Context, daemonSet *v1alpha1.DaemonSet, opts v1.UpdateOptions) (result *v1alpha1.DaemonSet, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(daemonsetsResource, c.ns, daemonSet), &v1alpha1.DaemonSet{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.DaemonSet), err
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *FakeDaemonSets) UpdateStatus(ctx context.Context, daemonSet *v1alpha1.DaemonSet, opts v1.UpdateOptions) (*v1alpha1.DaemonSet, error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(daemonsetsResource, "status", c.ns, daemonSet), &v1alpha1.DaemonSet{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.DaemonSet), err
}
// Delete takes name of the daemonSet and deletes it. Returns an error if one occurs.
func (c *FakeDaemonSets) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteActionWithOptions(daemonsetsResource, c.ns, name, opts), &v1alpha1.DaemonSet{})
return err
}
// DeleteCollection deletes a collection of objects.
func (c *FakeDaemonSets) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(daemonsetsResource, c.ns, listOpts)
_, err := c.Fake.Invokes(action, &v1alpha1.DaemonSetList{})
return err
}
// Patch applies the patch and returns the patched daemonSet.
func (c *FakeDaemonSets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.DaemonSet, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(daemonsetsResource, c.ns, name, pt, data, subresources...), &v1alpha1.DaemonSet{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.DaemonSet), err
} }

View File

@ -18,123 +18,34 @@ limitations under the License.
package fake package fake
import ( import (
"context"
v1alpha1 "github.com/openkruise/kruise/apis/apps/v1alpha1" v1alpha1 "github.com/openkruise/kruise/apis/apps/v1alpha1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1" appsv1alpha1 "github.com/openkruise/kruise/pkg/client/clientset/versioned/typed/apps/v1alpha1"
labels "k8s.io/apimachinery/pkg/labels" gentype "k8s.io/client-go/gentype"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
testing "k8s.io/client-go/testing"
) )
// FakeEphemeralJobs implements EphemeralJobInterface // fakeEphemeralJobs implements EphemeralJobInterface
type FakeEphemeralJobs struct { type fakeEphemeralJobs struct {
*gentype.FakeClientWithList[*v1alpha1.EphemeralJob, *v1alpha1.EphemeralJobList]
Fake *FakeAppsV1alpha1 Fake *FakeAppsV1alpha1
ns string
} }
var ephemeraljobsResource = v1alpha1.SchemeGroupVersion.WithResource("ephemeraljobs") func newFakeEphemeralJobs(fake *FakeAppsV1alpha1, namespace string) appsv1alpha1.EphemeralJobInterface {
return &fakeEphemeralJobs{
var ephemeraljobsKind = v1alpha1.SchemeGroupVersion.WithKind("EphemeralJob") gentype.NewFakeClientWithList[*v1alpha1.EphemeralJob, *v1alpha1.EphemeralJobList](
fake.Fake,
// Get takes name of the ephemeralJob, and returns the corresponding ephemeralJob object, and an error if there is any. namespace,
func (c *FakeEphemeralJobs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.EphemeralJob, err error) { v1alpha1.SchemeGroupVersion.WithResource("ephemeraljobs"),
obj, err := c.Fake. v1alpha1.SchemeGroupVersion.WithKind("EphemeralJob"),
Invokes(testing.NewGetAction(ephemeraljobsResource, c.ns, name), &v1alpha1.EphemeralJob{}) func() *v1alpha1.EphemeralJob { return &v1alpha1.EphemeralJob{} },
func() *v1alpha1.EphemeralJobList { return &v1alpha1.EphemeralJobList{} },
if obj == nil { func(dst, src *v1alpha1.EphemeralJobList) { dst.ListMeta = src.ListMeta },
return nil, err func(list *v1alpha1.EphemeralJobList) []*v1alpha1.EphemeralJob {
return gentype.ToPointerSlice(list.Items)
},
func(list *v1alpha1.EphemeralJobList, items []*v1alpha1.EphemeralJob) {
list.Items = gentype.FromPointerSlice(items)
},
),
fake,
} }
return obj.(*v1alpha1.EphemeralJob), err
}
// List takes label and field selectors, and returns the list of EphemeralJobs that match those selectors.
func (c *FakeEphemeralJobs) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.EphemeralJobList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(ephemeraljobsResource, ephemeraljobsKind, c.ns, opts), &v1alpha1.EphemeralJobList{})
if obj == nil {
return nil, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
if label == nil {
label = labels.Everything()
}
list := &v1alpha1.EphemeralJobList{ListMeta: obj.(*v1alpha1.EphemeralJobList).ListMeta}
for _, item := range obj.(*v1alpha1.EphemeralJobList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
}
return list, err
}
// Watch returns a watch.Interface that watches the requested ephemeralJobs.
func (c *FakeEphemeralJobs) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(ephemeraljobsResource, c.ns, opts))
}
// Create takes the representation of a ephemeralJob and creates it. Returns the server's representation of the ephemeralJob, and an error, if there is any.
func (c *FakeEphemeralJobs) Create(ctx context.Context, ephemeralJob *v1alpha1.EphemeralJob, opts v1.CreateOptions) (result *v1alpha1.EphemeralJob, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(ephemeraljobsResource, c.ns, ephemeralJob), &v1alpha1.EphemeralJob{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.EphemeralJob), err
}
// Update takes the representation of a ephemeralJob and updates it. Returns the server's representation of the ephemeralJob, and an error, if there is any.
func (c *FakeEphemeralJobs) Update(ctx context.Context, ephemeralJob *v1alpha1.EphemeralJob, opts v1.UpdateOptions) (result *v1alpha1.EphemeralJob, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(ephemeraljobsResource, c.ns, ephemeralJob), &v1alpha1.EphemeralJob{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.EphemeralJob), err
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *FakeEphemeralJobs) UpdateStatus(ctx context.Context, ephemeralJob *v1alpha1.EphemeralJob, opts v1.UpdateOptions) (*v1alpha1.EphemeralJob, error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(ephemeraljobsResource, "status", c.ns, ephemeralJob), &v1alpha1.EphemeralJob{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.EphemeralJob), err
}
// Delete takes name of the ephemeralJob and deletes it. Returns an error if one occurs.
func (c *FakeEphemeralJobs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteActionWithOptions(ephemeraljobsResource, c.ns, name, opts), &v1alpha1.EphemeralJob{})
return err
}
// DeleteCollection deletes a collection of objects.
func (c *FakeEphemeralJobs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(ephemeraljobsResource, c.ns, listOpts)
_, err := c.Fake.Invokes(action, &v1alpha1.EphemeralJobList{})
return err
}
// Patch applies the patch and returns the patched ephemeralJob.
func (c *FakeEphemeralJobs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.EphemeralJob, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(ephemeraljobsResource, c.ns, name, pt, data, subresources...), &v1alpha1.EphemeralJob{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.EphemeralJob), err
} }

View File

@ -18,123 +18,34 @@ limitations under the License.
package fake package fake
import ( import (
"context"
v1alpha1 "github.com/openkruise/kruise/apis/apps/v1alpha1" v1alpha1 "github.com/openkruise/kruise/apis/apps/v1alpha1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1" appsv1alpha1 "github.com/openkruise/kruise/pkg/client/clientset/versioned/typed/apps/v1alpha1"
labels "k8s.io/apimachinery/pkg/labels" gentype "k8s.io/client-go/gentype"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
testing "k8s.io/client-go/testing"
) )
// FakeImageListPullJobs implements ImageListPullJobInterface // fakeImageListPullJobs implements ImageListPullJobInterface
type FakeImageListPullJobs struct { type fakeImageListPullJobs struct {
*gentype.FakeClientWithList[*v1alpha1.ImageListPullJob, *v1alpha1.ImageListPullJobList]
Fake *FakeAppsV1alpha1 Fake *FakeAppsV1alpha1
ns string
} }
var imagelistpulljobsResource = v1alpha1.SchemeGroupVersion.WithResource("imagelistpulljobs") func newFakeImageListPullJobs(fake *FakeAppsV1alpha1, namespace string) appsv1alpha1.ImageListPullJobInterface {
return &fakeImageListPullJobs{
var imagelistpulljobsKind = v1alpha1.SchemeGroupVersion.WithKind("ImageListPullJob") gentype.NewFakeClientWithList[*v1alpha1.ImageListPullJob, *v1alpha1.ImageListPullJobList](
fake.Fake,
// Get takes name of the imageListPullJob, and returns the corresponding imageListPullJob object, and an error if there is any. namespace,
func (c *FakeImageListPullJobs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.ImageListPullJob, err error) { v1alpha1.SchemeGroupVersion.WithResource("imagelistpulljobs"),
obj, err := c.Fake. v1alpha1.SchemeGroupVersion.WithKind("ImageListPullJob"),
Invokes(testing.NewGetAction(imagelistpulljobsResource, c.ns, name), &v1alpha1.ImageListPullJob{}) func() *v1alpha1.ImageListPullJob { return &v1alpha1.ImageListPullJob{} },
func() *v1alpha1.ImageListPullJobList { return &v1alpha1.ImageListPullJobList{} },
if obj == nil { func(dst, src *v1alpha1.ImageListPullJobList) { dst.ListMeta = src.ListMeta },
return nil, err func(list *v1alpha1.ImageListPullJobList) []*v1alpha1.ImageListPullJob {
return gentype.ToPointerSlice(list.Items)
},
func(list *v1alpha1.ImageListPullJobList, items []*v1alpha1.ImageListPullJob) {
list.Items = gentype.FromPointerSlice(items)
},
),
fake,
} }
return obj.(*v1alpha1.ImageListPullJob), err
}
// List takes label and field selectors, and returns the list of ImageListPullJobs that match those selectors.
func (c *FakeImageListPullJobs) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.ImageListPullJobList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(imagelistpulljobsResource, imagelistpulljobsKind, c.ns, opts), &v1alpha1.ImageListPullJobList{})
if obj == nil {
return nil, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
if label == nil {
label = labels.Everything()
}
list := &v1alpha1.ImageListPullJobList{ListMeta: obj.(*v1alpha1.ImageListPullJobList).ListMeta}
for _, item := range obj.(*v1alpha1.ImageListPullJobList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
}
return list, err
}
// Watch returns a watch.Interface that watches the requested imageListPullJobs.
func (c *FakeImageListPullJobs) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(imagelistpulljobsResource, c.ns, opts))
}
// Create takes the representation of a imageListPullJob and creates it. Returns the server's representation of the imageListPullJob, and an error, if there is any.
func (c *FakeImageListPullJobs) Create(ctx context.Context, imageListPullJob *v1alpha1.ImageListPullJob, opts v1.CreateOptions) (result *v1alpha1.ImageListPullJob, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(imagelistpulljobsResource, c.ns, imageListPullJob), &v1alpha1.ImageListPullJob{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.ImageListPullJob), err
}
// Update takes the representation of a imageListPullJob and updates it. Returns the server's representation of the imageListPullJob, and an error, if there is any.
func (c *FakeImageListPullJobs) Update(ctx context.Context, imageListPullJob *v1alpha1.ImageListPullJob, opts v1.UpdateOptions) (result *v1alpha1.ImageListPullJob, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(imagelistpulljobsResource, c.ns, imageListPullJob), &v1alpha1.ImageListPullJob{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.ImageListPullJob), err
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *FakeImageListPullJobs) UpdateStatus(ctx context.Context, imageListPullJob *v1alpha1.ImageListPullJob, opts v1.UpdateOptions) (*v1alpha1.ImageListPullJob, error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(imagelistpulljobsResource, "status", c.ns, imageListPullJob), &v1alpha1.ImageListPullJob{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.ImageListPullJob), err
}
// Delete takes name of the imageListPullJob and deletes it. Returns an error if one occurs.
func (c *FakeImageListPullJobs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteActionWithOptions(imagelistpulljobsResource, c.ns, name, opts), &v1alpha1.ImageListPullJob{})
return err
}
// DeleteCollection deletes a collection of objects.
func (c *FakeImageListPullJobs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(imagelistpulljobsResource, c.ns, listOpts)
_, err := c.Fake.Invokes(action, &v1alpha1.ImageListPullJobList{})
return err
}
// Patch applies the patch and returns the patched imageListPullJob.
func (c *FakeImageListPullJobs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ImageListPullJob, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(imagelistpulljobsResource, c.ns, name, pt, data, subresources...), &v1alpha1.ImageListPullJob{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.ImageListPullJob), err
} }

View File

@ -18,123 +18,34 @@ limitations under the License.
package fake package fake
import ( import (
"context"
v1alpha1 "github.com/openkruise/kruise/apis/apps/v1alpha1" v1alpha1 "github.com/openkruise/kruise/apis/apps/v1alpha1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1" appsv1alpha1 "github.com/openkruise/kruise/pkg/client/clientset/versioned/typed/apps/v1alpha1"
labels "k8s.io/apimachinery/pkg/labels" gentype "k8s.io/client-go/gentype"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
testing "k8s.io/client-go/testing"
) )
// FakeImagePullJobs implements ImagePullJobInterface // fakeImagePullJobs implements ImagePullJobInterface
type FakeImagePullJobs struct { type fakeImagePullJobs struct {
*gentype.FakeClientWithList[*v1alpha1.ImagePullJob, *v1alpha1.ImagePullJobList]
Fake *FakeAppsV1alpha1 Fake *FakeAppsV1alpha1
ns string
} }
var imagepulljobsResource = v1alpha1.SchemeGroupVersion.WithResource("imagepulljobs") func newFakeImagePullJobs(fake *FakeAppsV1alpha1, namespace string) appsv1alpha1.ImagePullJobInterface {
return &fakeImagePullJobs{
var imagepulljobsKind = v1alpha1.SchemeGroupVersion.WithKind("ImagePullJob") gentype.NewFakeClientWithList[*v1alpha1.ImagePullJob, *v1alpha1.ImagePullJobList](
fake.Fake,
// Get takes name of the imagePullJob, and returns the corresponding imagePullJob object, and an error if there is any. namespace,
func (c *FakeImagePullJobs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.ImagePullJob, err error) { v1alpha1.SchemeGroupVersion.WithResource("imagepulljobs"),
obj, err := c.Fake. v1alpha1.SchemeGroupVersion.WithKind("ImagePullJob"),
Invokes(testing.NewGetAction(imagepulljobsResource, c.ns, name), &v1alpha1.ImagePullJob{}) func() *v1alpha1.ImagePullJob { return &v1alpha1.ImagePullJob{} },
func() *v1alpha1.ImagePullJobList { return &v1alpha1.ImagePullJobList{} },
if obj == nil { func(dst, src *v1alpha1.ImagePullJobList) { dst.ListMeta = src.ListMeta },
return nil, err func(list *v1alpha1.ImagePullJobList) []*v1alpha1.ImagePullJob {
return gentype.ToPointerSlice(list.Items)
},
func(list *v1alpha1.ImagePullJobList, items []*v1alpha1.ImagePullJob) {
list.Items = gentype.FromPointerSlice(items)
},
),
fake,
} }
return obj.(*v1alpha1.ImagePullJob), err
}
// List takes label and field selectors, and returns the list of ImagePullJobs that match those selectors.
func (c *FakeImagePullJobs) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.ImagePullJobList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(imagepulljobsResource, imagepulljobsKind, c.ns, opts), &v1alpha1.ImagePullJobList{})
if obj == nil {
return nil, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
if label == nil {
label = labels.Everything()
}
list := &v1alpha1.ImagePullJobList{ListMeta: obj.(*v1alpha1.ImagePullJobList).ListMeta}
for _, item := range obj.(*v1alpha1.ImagePullJobList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
}
return list, err
}
// Watch returns a watch.Interface that watches the requested imagePullJobs.
func (c *FakeImagePullJobs) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(imagepulljobsResource, c.ns, opts))
}
// Create takes the representation of a imagePullJob and creates it. Returns the server's representation of the imagePullJob, and an error, if there is any.
func (c *FakeImagePullJobs) Create(ctx context.Context, imagePullJob *v1alpha1.ImagePullJob, opts v1.CreateOptions) (result *v1alpha1.ImagePullJob, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(imagepulljobsResource, c.ns, imagePullJob), &v1alpha1.ImagePullJob{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.ImagePullJob), err
}
// Update takes the representation of a imagePullJob and updates it. Returns the server's representation of the imagePullJob, and an error, if there is any.
func (c *FakeImagePullJobs) Update(ctx context.Context, imagePullJob *v1alpha1.ImagePullJob, opts v1.UpdateOptions) (result *v1alpha1.ImagePullJob, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(imagepulljobsResource, c.ns, imagePullJob), &v1alpha1.ImagePullJob{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.ImagePullJob), err
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *FakeImagePullJobs) UpdateStatus(ctx context.Context, imagePullJob *v1alpha1.ImagePullJob, opts v1.UpdateOptions) (*v1alpha1.ImagePullJob, error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(imagepulljobsResource, "status", c.ns, imagePullJob), &v1alpha1.ImagePullJob{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.ImagePullJob), err
}
// Delete takes name of the imagePullJob and deletes it. Returns an error if one occurs.
func (c *FakeImagePullJobs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteActionWithOptions(imagepulljobsResource, c.ns, name, opts), &v1alpha1.ImagePullJob{})
return err
}
// DeleteCollection deletes a collection of objects.
func (c *FakeImagePullJobs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(imagepulljobsResource, c.ns, listOpts)
_, err := c.Fake.Invokes(action, &v1alpha1.ImagePullJobList{})
return err
}
// Patch applies the patch and returns the patched imagePullJob.
func (c *FakeImagePullJobs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ImagePullJob, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(imagepulljobsResource, c.ns, name, pt, data, subresources...), &v1alpha1.ImagePullJob{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.ImagePullJob), err
} }

View File

@ -18,114 +18,32 @@ limitations under the License.
package fake package fake
import ( import (
"context"
v1alpha1 "github.com/openkruise/kruise/apis/apps/v1alpha1" v1alpha1 "github.com/openkruise/kruise/apis/apps/v1alpha1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1" appsv1alpha1 "github.com/openkruise/kruise/pkg/client/clientset/versioned/typed/apps/v1alpha1"
labels "k8s.io/apimachinery/pkg/labels" gentype "k8s.io/client-go/gentype"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
testing "k8s.io/client-go/testing"
) )
// FakeNodeImages implements NodeImageInterface // fakeNodeImages implements NodeImageInterface
type FakeNodeImages struct { type fakeNodeImages struct {
*gentype.FakeClientWithList[*v1alpha1.NodeImage, *v1alpha1.NodeImageList]
Fake *FakeAppsV1alpha1 Fake *FakeAppsV1alpha1
} }
var nodeimagesResource = v1alpha1.SchemeGroupVersion.WithResource("nodeimages") func newFakeNodeImages(fake *FakeAppsV1alpha1) appsv1alpha1.NodeImageInterface {
return &fakeNodeImages{
var nodeimagesKind = v1alpha1.SchemeGroupVersion.WithKind("NodeImage") gentype.NewFakeClientWithList[*v1alpha1.NodeImage, *v1alpha1.NodeImageList](
fake.Fake,
// Get takes name of the nodeImage, and returns the corresponding nodeImage object, and an error if there is any. "",
func (c *FakeNodeImages) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.NodeImage, err error) { v1alpha1.SchemeGroupVersion.WithResource("nodeimages"),
obj, err := c.Fake. v1alpha1.SchemeGroupVersion.WithKind("NodeImage"),
Invokes(testing.NewRootGetAction(nodeimagesResource, name), &v1alpha1.NodeImage{}) func() *v1alpha1.NodeImage { return &v1alpha1.NodeImage{} },
if obj == nil { func() *v1alpha1.NodeImageList { return &v1alpha1.NodeImageList{} },
return nil, err func(dst, src *v1alpha1.NodeImageList) { dst.ListMeta = src.ListMeta },
func(list *v1alpha1.NodeImageList) []*v1alpha1.NodeImage { return gentype.ToPointerSlice(list.Items) },
func(list *v1alpha1.NodeImageList, items []*v1alpha1.NodeImage) {
list.Items = gentype.FromPointerSlice(items)
},
),
fake,
} }
return obj.(*v1alpha1.NodeImage), err
}
// List takes label and field selectors, and returns the list of NodeImages that match those selectors.
func (c *FakeNodeImages) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.NodeImageList, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootListAction(nodeimagesResource, nodeimagesKind, opts), &v1alpha1.NodeImageList{})
if obj == nil {
return nil, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
if label == nil {
label = labels.Everything()
}
list := &v1alpha1.NodeImageList{ListMeta: obj.(*v1alpha1.NodeImageList).ListMeta}
for _, item := range obj.(*v1alpha1.NodeImageList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
}
return list, err
}
// Watch returns a watch.Interface that watches the requested nodeImages.
func (c *FakeNodeImages) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewRootWatchAction(nodeimagesResource, opts))
}
// Create takes the representation of a nodeImage and creates it. Returns the server's representation of the nodeImage, and an error, if there is any.
func (c *FakeNodeImages) Create(ctx context.Context, nodeImage *v1alpha1.NodeImage, opts v1.CreateOptions) (result *v1alpha1.NodeImage, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootCreateAction(nodeimagesResource, nodeImage), &v1alpha1.NodeImage{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.NodeImage), err
}
// Update takes the representation of a nodeImage and updates it. Returns the server's representation of the nodeImage, and an error, if there is any.
func (c *FakeNodeImages) Update(ctx context.Context, nodeImage *v1alpha1.NodeImage, opts v1.UpdateOptions) (result *v1alpha1.NodeImage, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootUpdateAction(nodeimagesResource, nodeImage), &v1alpha1.NodeImage{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.NodeImage), err
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *FakeNodeImages) UpdateStatus(ctx context.Context, nodeImage *v1alpha1.NodeImage, opts v1.UpdateOptions) (*v1alpha1.NodeImage, error) {
obj, err := c.Fake.
Invokes(testing.NewRootUpdateSubresourceAction(nodeimagesResource, "status", nodeImage), &v1alpha1.NodeImage{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.NodeImage), err
}
// Delete takes name of the nodeImage and deletes it. Returns an error if one occurs.
func (c *FakeNodeImages) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewRootDeleteActionWithOptions(nodeimagesResource, name, opts), &v1alpha1.NodeImage{})
return err
}
// DeleteCollection deletes a collection of objects.
func (c *FakeNodeImages) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewRootDeleteCollectionAction(nodeimagesResource, listOpts)
_, err := c.Fake.Invokes(action, &v1alpha1.NodeImageList{})
return err
}
// Patch applies the patch and returns the patched nodeImage.
func (c *FakeNodeImages) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.NodeImage, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootPatchSubresourceAction(nodeimagesResource, name, pt, data, subresources...), &v1alpha1.NodeImage{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.NodeImage), err
} }

View File

@ -18,114 +18,34 @@ limitations under the License.
package fake package fake
import ( import (
"context"
v1alpha1 "github.com/openkruise/kruise/apis/apps/v1alpha1" v1alpha1 "github.com/openkruise/kruise/apis/apps/v1alpha1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1" appsv1alpha1 "github.com/openkruise/kruise/pkg/client/clientset/versioned/typed/apps/v1alpha1"
labels "k8s.io/apimachinery/pkg/labels" gentype "k8s.io/client-go/gentype"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
testing "k8s.io/client-go/testing"
) )
// FakeNodePodProbes implements NodePodProbeInterface // fakeNodePodProbes implements NodePodProbeInterface
type FakeNodePodProbes struct { type fakeNodePodProbes struct {
*gentype.FakeClientWithList[*v1alpha1.NodePodProbe, *v1alpha1.NodePodProbeList]
Fake *FakeAppsV1alpha1 Fake *FakeAppsV1alpha1
} }
var nodepodprobesResource = v1alpha1.SchemeGroupVersion.WithResource("nodepodprobes") func newFakeNodePodProbes(fake *FakeAppsV1alpha1) appsv1alpha1.NodePodProbeInterface {
return &fakeNodePodProbes{
var nodepodprobesKind = v1alpha1.SchemeGroupVersion.WithKind("NodePodProbe") gentype.NewFakeClientWithList[*v1alpha1.NodePodProbe, *v1alpha1.NodePodProbeList](
fake.Fake,
// Get takes name of the nodePodProbe, and returns the corresponding nodePodProbe object, and an error if there is any. "",
func (c *FakeNodePodProbes) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.NodePodProbe, err error) { v1alpha1.SchemeGroupVersion.WithResource("nodepodprobes"),
obj, err := c.Fake. v1alpha1.SchemeGroupVersion.WithKind("NodePodProbe"),
Invokes(testing.NewRootGetAction(nodepodprobesResource, name), &v1alpha1.NodePodProbe{}) func() *v1alpha1.NodePodProbe { return &v1alpha1.NodePodProbe{} },
if obj == nil { func() *v1alpha1.NodePodProbeList { return &v1alpha1.NodePodProbeList{} },
return nil, err func(dst, src *v1alpha1.NodePodProbeList) { dst.ListMeta = src.ListMeta },
func(list *v1alpha1.NodePodProbeList) []*v1alpha1.NodePodProbe {
return gentype.ToPointerSlice(list.Items)
},
func(list *v1alpha1.NodePodProbeList, items []*v1alpha1.NodePodProbe) {
list.Items = gentype.FromPointerSlice(items)
},
),
fake,
} }
return obj.(*v1alpha1.NodePodProbe), err
}
// List takes label and field selectors, and returns the list of NodePodProbes that match those selectors.
func (c *FakeNodePodProbes) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.NodePodProbeList, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootListAction(nodepodprobesResource, nodepodprobesKind, opts), &v1alpha1.NodePodProbeList{})
if obj == nil {
return nil, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
if label == nil {
label = labels.Everything()
}
list := &v1alpha1.NodePodProbeList{ListMeta: obj.(*v1alpha1.NodePodProbeList).ListMeta}
for _, item := range obj.(*v1alpha1.NodePodProbeList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
}
return list, err
}
// Watch returns a watch.Interface that watches the requested nodePodProbes.
func (c *FakeNodePodProbes) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewRootWatchAction(nodepodprobesResource, opts))
}
// Create takes the representation of a nodePodProbe and creates it. Returns the server's representation of the nodePodProbe, and an error, if there is any.
func (c *FakeNodePodProbes) Create(ctx context.Context, nodePodProbe *v1alpha1.NodePodProbe, opts v1.CreateOptions) (result *v1alpha1.NodePodProbe, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootCreateAction(nodepodprobesResource, nodePodProbe), &v1alpha1.NodePodProbe{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.NodePodProbe), err
}
// Update takes the representation of a nodePodProbe and updates it. Returns the server's representation of the nodePodProbe, and an error, if there is any.
func (c *FakeNodePodProbes) Update(ctx context.Context, nodePodProbe *v1alpha1.NodePodProbe, opts v1.UpdateOptions) (result *v1alpha1.NodePodProbe, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootUpdateAction(nodepodprobesResource, nodePodProbe), &v1alpha1.NodePodProbe{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.NodePodProbe), err
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *FakeNodePodProbes) UpdateStatus(ctx context.Context, nodePodProbe *v1alpha1.NodePodProbe, opts v1.UpdateOptions) (*v1alpha1.NodePodProbe, error) {
obj, err := c.Fake.
Invokes(testing.NewRootUpdateSubresourceAction(nodepodprobesResource, "status", nodePodProbe), &v1alpha1.NodePodProbe{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.NodePodProbe), err
}
// Delete takes name of the nodePodProbe and deletes it. Returns an error if one occurs.
func (c *FakeNodePodProbes) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewRootDeleteActionWithOptions(nodepodprobesResource, name, opts), &v1alpha1.NodePodProbe{})
return err
}
// DeleteCollection deletes a collection of objects.
func (c *FakeNodePodProbes) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewRootDeleteCollectionAction(nodepodprobesResource, listOpts)
_, err := c.Fake.Invokes(action, &v1alpha1.NodePodProbeList{})
return err
}
// Patch applies the patch and returns the patched nodePodProbe.
func (c *FakeNodePodProbes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.NodePodProbe, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootPatchSubresourceAction(nodepodprobesResource, name, pt, data, subresources...), &v1alpha1.NodePodProbe{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.NodePodProbe), err
} }

View File

@ -18,123 +18,34 @@ limitations under the License.
package fake package fake
import ( import (
"context"
v1alpha1 "github.com/openkruise/kruise/apis/apps/v1alpha1" v1alpha1 "github.com/openkruise/kruise/apis/apps/v1alpha1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1" appsv1alpha1 "github.com/openkruise/kruise/pkg/client/clientset/versioned/typed/apps/v1alpha1"
labels "k8s.io/apimachinery/pkg/labels" gentype "k8s.io/client-go/gentype"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
testing "k8s.io/client-go/testing"
) )
// FakePersistentPodStates implements PersistentPodStateInterface // fakePersistentPodStates implements PersistentPodStateInterface
type FakePersistentPodStates struct { type fakePersistentPodStates struct {
*gentype.FakeClientWithList[*v1alpha1.PersistentPodState, *v1alpha1.PersistentPodStateList]
Fake *FakeAppsV1alpha1 Fake *FakeAppsV1alpha1
ns string
} }
var persistentpodstatesResource = v1alpha1.SchemeGroupVersion.WithResource("persistentpodstates") func newFakePersistentPodStates(fake *FakeAppsV1alpha1, namespace string) appsv1alpha1.PersistentPodStateInterface {
return &fakePersistentPodStates{
var persistentpodstatesKind = v1alpha1.SchemeGroupVersion.WithKind("PersistentPodState") gentype.NewFakeClientWithList[*v1alpha1.PersistentPodState, *v1alpha1.PersistentPodStateList](
fake.Fake,
// Get takes name of the persistentPodState, and returns the corresponding persistentPodState object, and an error if there is any. namespace,
func (c *FakePersistentPodStates) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.PersistentPodState, err error) { v1alpha1.SchemeGroupVersion.WithResource("persistentpodstates"),
obj, err := c.Fake. v1alpha1.SchemeGroupVersion.WithKind("PersistentPodState"),
Invokes(testing.NewGetAction(persistentpodstatesResource, c.ns, name), &v1alpha1.PersistentPodState{}) func() *v1alpha1.PersistentPodState { return &v1alpha1.PersistentPodState{} },
func() *v1alpha1.PersistentPodStateList { return &v1alpha1.PersistentPodStateList{} },
if obj == nil { func(dst, src *v1alpha1.PersistentPodStateList) { dst.ListMeta = src.ListMeta },
return nil, err func(list *v1alpha1.PersistentPodStateList) []*v1alpha1.PersistentPodState {
return gentype.ToPointerSlice(list.Items)
},
func(list *v1alpha1.PersistentPodStateList, items []*v1alpha1.PersistentPodState) {
list.Items = gentype.FromPointerSlice(items)
},
),
fake,
} }
return obj.(*v1alpha1.PersistentPodState), err
}
// List takes label and field selectors, and returns the list of PersistentPodStates that match those selectors.
func (c *FakePersistentPodStates) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.PersistentPodStateList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(persistentpodstatesResource, persistentpodstatesKind, c.ns, opts), &v1alpha1.PersistentPodStateList{})
if obj == nil {
return nil, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
if label == nil {
label = labels.Everything()
}
list := &v1alpha1.PersistentPodStateList{ListMeta: obj.(*v1alpha1.PersistentPodStateList).ListMeta}
for _, item := range obj.(*v1alpha1.PersistentPodStateList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
}
return list, err
}
// Watch returns a watch.Interface that watches the requested persistentPodStates.
func (c *FakePersistentPodStates) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(persistentpodstatesResource, c.ns, opts))
}
// Create takes the representation of a persistentPodState and creates it. Returns the server's representation of the persistentPodState, and an error, if there is any.
func (c *FakePersistentPodStates) Create(ctx context.Context, persistentPodState *v1alpha1.PersistentPodState, opts v1.CreateOptions) (result *v1alpha1.PersistentPodState, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(persistentpodstatesResource, c.ns, persistentPodState), &v1alpha1.PersistentPodState{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.PersistentPodState), err
}
// Update takes the representation of a persistentPodState and updates it. Returns the server's representation of the persistentPodState, and an error, if there is any.
func (c *FakePersistentPodStates) Update(ctx context.Context, persistentPodState *v1alpha1.PersistentPodState, opts v1.UpdateOptions) (result *v1alpha1.PersistentPodState, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(persistentpodstatesResource, c.ns, persistentPodState), &v1alpha1.PersistentPodState{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.PersistentPodState), err
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *FakePersistentPodStates) UpdateStatus(ctx context.Context, persistentPodState *v1alpha1.PersistentPodState, opts v1.UpdateOptions) (*v1alpha1.PersistentPodState, error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(persistentpodstatesResource, "status", c.ns, persistentPodState), &v1alpha1.PersistentPodState{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.PersistentPodState), err
}
// Delete takes name of the persistentPodState and deletes it. Returns an error if one occurs.
func (c *FakePersistentPodStates) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteActionWithOptions(persistentpodstatesResource, c.ns, name, opts), &v1alpha1.PersistentPodState{})
return err
}
// DeleteCollection deletes a collection of objects.
func (c *FakePersistentPodStates) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(persistentpodstatesResource, c.ns, listOpts)
_, err := c.Fake.Invokes(action, &v1alpha1.PersistentPodStateList{})
return err
}
// Patch applies the patch and returns the patched persistentPodState.
func (c *FakePersistentPodStates) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.PersistentPodState, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(persistentpodstatesResource, c.ns, name, pt, data, subresources...), &v1alpha1.PersistentPodState{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.PersistentPodState), err
} }

View File

@ -18,123 +18,34 @@ limitations under the License.
package fake package fake
import ( import (
"context"
v1alpha1 "github.com/openkruise/kruise/apis/apps/v1alpha1" v1alpha1 "github.com/openkruise/kruise/apis/apps/v1alpha1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1" appsv1alpha1 "github.com/openkruise/kruise/pkg/client/clientset/versioned/typed/apps/v1alpha1"
labels "k8s.io/apimachinery/pkg/labels" gentype "k8s.io/client-go/gentype"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
testing "k8s.io/client-go/testing"
) )
// FakePodProbeMarkers implements PodProbeMarkerInterface // fakePodProbeMarkers implements PodProbeMarkerInterface
type FakePodProbeMarkers struct { type fakePodProbeMarkers struct {
*gentype.FakeClientWithList[*v1alpha1.PodProbeMarker, *v1alpha1.PodProbeMarkerList]
Fake *FakeAppsV1alpha1 Fake *FakeAppsV1alpha1
ns string
} }
var podprobemarkersResource = v1alpha1.SchemeGroupVersion.WithResource("podprobemarkers") func newFakePodProbeMarkers(fake *FakeAppsV1alpha1, namespace string) appsv1alpha1.PodProbeMarkerInterface {
return &fakePodProbeMarkers{
var podprobemarkersKind = v1alpha1.SchemeGroupVersion.WithKind("PodProbeMarker") gentype.NewFakeClientWithList[*v1alpha1.PodProbeMarker, *v1alpha1.PodProbeMarkerList](
fake.Fake,
// Get takes name of the podProbeMarker, and returns the corresponding podProbeMarker object, and an error if there is any. namespace,
func (c *FakePodProbeMarkers) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.PodProbeMarker, err error) { v1alpha1.SchemeGroupVersion.WithResource("podprobemarkers"),
obj, err := c.Fake. v1alpha1.SchemeGroupVersion.WithKind("PodProbeMarker"),
Invokes(testing.NewGetAction(podprobemarkersResource, c.ns, name), &v1alpha1.PodProbeMarker{}) func() *v1alpha1.PodProbeMarker { return &v1alpha1.PodProbeMarker{} },
func() *v1alpha1.PodProbeMarkerList { return &v1alpha1.PodProbeMarkerList{} },
if obj == nil { func(dst, src *v1alpha1.PodProbeMarkerList) { dst.ListMeta = src.ListMeta },
return nil, err func(list *v1alpha1.PodProbeMarkerList) []*v1alpha1.PodProbeMarker {
return gentype.ToPointerSlice(list.Items)
},
func(list *v1alpha1.PodProbeMarkerList, items []*v1alpha1.PodProbeMarker) {
list.Items = gentype.FromPointerSlice(items)
},
),
fake,
} }
return obj.(*v1alpha1.PodProbeMarker), err
}
// List takes label and field selectors, and returns the list of PodProbeMarkers that match those selectors.
func (c *FakePodProbeMarkers) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.PodProbeMarkerList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(podprobemarkersResource, podprobemarkersKind, c.ns, opts), &v1alpha1.PodProbeMarkerList{})
if obj == nil {
return nil, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
if label == nil {
label = labels.Everything()
}
list := &v1alpha1.PodProbeMarkerList{ListMeta: obj.(*v1alpha1.PodProbeMarkerList).ListMeta}
for _, item := range obj.(*v1alpha1.PodProbeMarkerList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
}
return list, err
}
// Watch returns a watch.Interface that watches the requested podProbeMarkers.
func (c *FakePodProbeMarkers) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(podprobemarkersResource, c.ns, opts))
}
// Create takes the representation of a podProbeMarker and creates it. Returns the server's representation of the podProbeMarker, and an error, if there is any.
func (c *FakePodProbeMarkers) Create(ctx context.Context, podProbeMarker *v1alpha1.PodProbeMarker, opts v1.CreateOptions) (result *v1alpha1.PodProbeMarker, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(podprobemarkersResource, c.ns, podProbeMarker), &v1alpha1.PodProbeMarker{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.PodProbeMarker), err
}
// Update takes the representation of a podProbeMarker and updates it. Returns the server's representation of the podProbeMarker, and an error, if there is any.
func (c *FakePodProbeMarkers) Update(ctx context.Context, podProbeMarker *v1alpha1.PodProbeMarker, opts v1.UpdateOptions) (result *v1alpha1.PodProbeMarker, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(podprobemarkersResource, c.ns, podProbeMarker), &v1alpha1.PodProbeMarker{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.PodProbeMarker), err
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *FakePodProbeMarkers) UpdateStatus(ctx context.Context, podProbeMarker *v1alpha1.PodProbeMarker, opts v1.UpdateOptions) (*v1alpha1.PodProbeMarker, error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(podprobemarkersResource, "status", c.ns, podProbeMarker), &v1alpha1.PodProbeMarker{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.PodProbeMarker), err
}
// Delete takes name of the podProbeMarker and deletes it. Returns an error if one occurs.
func (c *FakePodProbeMarkers) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteActionWithOptions(podprobemarkersResource, c.ns, name, opts), &v1alpha1.PodProbeMarker{})
return err
}
// DeleteCollection deletes a collection of objects.
func (c *FakePodProbeMarkers) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(podprobemarkersResource, c.ns, listOpts)
_, err := c.Fake.Invokes(action, &v1alpha1.PodProbeMarkerList{})
return err
}
// Patch applies the patch and returns the patched podProbeMarker.
func (c *FakePodProbeMarkers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.PodProbeMarker, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(podprobemarkersResource, c.ns, name, pt, data, subresources...), &v1alpha1.PodProbeMarker{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.PodProbeMarker), err
} }

View File

@ -18,114 +18,34 @@ limitations under the License.
package fake package fake
import ( import (
"context"
v1alpha1 "github.com/openkruise/kruise/apis/apps/v1alpha1" v1alpha1 "github.com/openkruise/kruise/apis/apps/v1alpha1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1" appsv1alpha1 "github.com/openkruise/kruise/pkg/client/clientset/versioned/typed/apps/v1alpha1"
labels "k8s.io/apimachinery/pkg/labels" gentype "k8s.io/client-go/gentype"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
testing "k8s.io/client-go/testing"
) )
// FakeResourceDistributions implements ResourceDistributionInterface // fakeResourceDistributions implements ResourceDistributionInterface
type FakeResourceDistributions struct { type fakeResourceDistributions struct {
*gentype.FakeClientWithList[*v1alpha1.ResourceDistribution, *v1alpha1.ResourceDistributionList]
Fake *FakeAppsV1alpha1 Fake *FakeAppsV1alpha1
} }
var resourcedistributionsResource = v1alpha1.SchemeGroupVersion.WithResource("resourcedistributions") func newFakeResourceDistributions(fake *FakeAppsV1alpha1) appsv1alpha1.ResourceDistributionInterface {
return &fakeResourceDistributions{
var resourcedistributionsKind = v1alpha1.SchemeGroupVersion.WithKind("ResourceDistribution") gentype.NewFakeClientWithList[*v1alpha1.ResourceDistribution, *v1alpha1.ResourceDistributionList](
fake.Fake,
// Get takes name of the resourceDistribution, and returns the corresponding resourceDistribution object, and an error if there is any. "",
func (c *FakeResourceDistributions) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.ResourceDistribution, err error) { v1alpha1.SchemeGroupVersion.WithResource("resourcedistributions"),
obj, err := c.Fake. v1alpha1.SchemeGroupVersion.WithKind("ResourceDistribution"),
Invokes(testing.NewRootGetAction(resourcedistributionsResource, name), &v1alpha1.ResourceDistribution{}) func() *v1alpha1.ResourceDistribution { return &v1alpha1.ResourceDistribution{} },
if obj == nil { func() *v1alpha1.ResourceDistributionList { return &v1alpha1.ResourceDistributionList{} },
return nil, err func(dst, src *v1alpha1.ResourceDistributionList) { dst.ListMeta = src.ListMeta },
func(list *v1alpha1.ResourceDistributionList) []*v1alpha1.ResourceDistribution {
return gentype.ToPointerSlice(list.Items)
},
func(list *v1alpha1.ResourceDistributionList, items []*v1alpha1.ResourceDistribution) {
list.Items = gentype.FromPointerSlice(items)
},
),
fake,
} }
return obj.(*v1alpha1.ResourceDistribution), err
}
// List takes label and field selectors, and returns the list of ResourceDistributions that match those selectors.
func (c *FakeResourceDistributions) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.ResourceDistributionList, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootListAction(resourcedistributionsResource, resourcedistributionsKind, opts), &v1alpha1.ResourceDistributionList{})
if obj == nil {
return nil, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
if label == nil {
label = labels.Everything()
}
list := &v1alpha1.ResourceDistributionList{ListMeta: obj.(*v1alpha1.ResourceDistributionList).ListMeta}
for _, item := range obj.(*v1alpha1.ResourceDistributionList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
}
return list, err
}
// Watch returns a watch.Interface that watches the requested resourceDistributions.
func (c *FakeResourceDistributions) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewRootWatchAction(resourcedistributionsResource, opts))
}
// Create takes the representation of a resourceDistribution and creates it. Returns the server's representation of the resourceDistribution, and an error, if there is any.
func (c *FakeResourceDistributions) Create(ctx context.Context, resourceDistribution *v1alpha1.ResourceDistribution, opts v1.CreateOptions) (result *v1alpha1.ResourceDistribution, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootCreateAction(resourcedistributionsResource, resourceDistribution), &v1alpha1.ResourceDistribution{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.ResourceDistribution), err
}
// Update takes the representation of a resourceDistribution and updates it. Returns the server's representation of the resourceDistribution, and an error, if there is any.
func (c *FakeResourceDistributions) Update(ctx context.Context, resourceDistribution *v1alpha1.ResourceDistribution, opts v1.UpdateOptions) (result *v1alpha1.ResourceDistribution, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootUpdateAction(resourcedistributionsResource, resourceDistribution), &v1alpha1.ResourceDistribution{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.ResourceDistribution), err
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *FakeResourceDistributions) UpdateStatus(ctx context.Context, resourceDistribution *v1alpha1.ResourceDistribution, opts v1.UpdateOptions) (*v1alpha1.ResourceDistribution, error) {
obj, err := c.Fake.
Invokes(testing.NewRootUpdateSubresourceAction(resourcedistributionsResource, "status", resourceDistribution), &v1alpha1.ResourceDistribution{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.ResourceDistribution), err
}
// Delete takes name of the resourceDistribution and deletes it. Returns an error if one occurs.
func (c *FakeResourceDistributions) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewRootDeleteActionWithOptions(resourcedistributionsResource, name, opts), &v1alpha1.ResourceDistribution{})
return err
}
// DeleteCollection deletes a collection of objects.
func (c *FakeResourceDistributions) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewRootDeleteCollectionAction(resourcedistributionsResource, listOpts)
_, err := c.Fake.Invokes(action, &v1alpha1.ResourceDistributionList{})
return err
}
// Patch applies the patch and returns the patched resourceDistribution.
func (c *FakeResourceDistributions) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ResourceDistribution, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootPatchSubresourceAction(resourcedistributionsResource, name, pt, data, subresources...), &v1alpha1.ResourceDistribution{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.ResourceDistribution), err
} }

View File

@ -18,114 +18,32 @@ limitations under the License.
package fake package fake
import ( import (
"context"
v1alpha1 "github.com/openkruise/kruise/apis/apps/v1alpha1" v1alpha1 "github.com/openkruise/kruise/apis/apps/v1alpha1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1" appsv1alpha1 "github.com/openkruise/kruise/pkg/client/clientset/versioned/typed/apps/v1alpha1"
labels "k8s.io/apimachinery/pkg/labels" gentype "k8s.io/client-go/gentype"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
testing "k8s.io/client-go/testing"
) )
// FakeSidecarSets implements SidecarSetInterface // fakeSidecarSets implements SidecarSetInterface
type FakeSidecarSets struct { type fakeSidecarSets struct {
*gentype.FakeClientWithList[*v1alpha1.SidecarSet, *v1alpha1.SidecarSetList]
Fake *FakeAppsV1alpha1 Fake *FakeAppsV1alpha1
} }
var sidecarsetsResource = v1alpha1.SchemeGroupVersion.WithResource("sidecarsets") func newFakeSidecarSets(fake *FakeAppsV1alpha1) appsv1alpha1.SidecarSetInterface {
return &fakeSidecarSets{
var sidecarsetsKind = v1alpha1.SchemeGroupVersion.WithKind("SidecarSet") gentype.NewFakeClientWithList[*v1alpha1.SidecarSet, *v1alpha1.SidecarSetList](
fake.Fake,
// Get takes name of the sidecarSet, and returns the corresponding sidecarSet object, and an error if there is any. "",
func (c *FakeSidecarSets) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.SidecarSet, err error) { v1alpha1.SchemeGroupVersion.WithResource("sidecarsets"),
obj, err := c.Fake. v1alpha1.SchemeGroupVersion.WithKind("SidecarSet"),
Invokes(testing.NewRootGetAction(sidecarsetsResource, name), &v1alpha1.SidecarSet{}) func() *v1alpha1.SidecarSet { return &v1alpha1.SidecarSet{} },
if obj == nil { func() *v1alpha1.SidecarSetList { return &v1alpha1.SidecarSetList{} },
return nil, err func(dst, src *v1alpha1.SidecarSetList) { dst.ListMeta = src.ListMeta },
func(list *v1alpha1.SidecarSetList) []*v1alpha1.SidecarSet { return gentype.ToPointerSlice(list.Items) },
func(list *v1alpha1.SidecarSetList, items []*v1alpha1.SidecarSet) {
list.Items = gentype.FromPointerSlice(items)
},
),
fake,
} }
return obj.(*v1alpha1.SidecarSet), err
}
// List takes label and field selectors, and returns the list of SidecarSets that match those selectors.
func (c *FakeSidecarSets) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.SidecarSetList, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootListAction(sidecarsetsResource, sidecarsetsKind, opts), &v1alpha1.SidecarSetList{})
if obj == nil {
return nil, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
if label == nil {
label = labels.Everything()
}
list := &v1alpha1.SidecarSetList{ListMeta: obj.(*v1alpha1.SidecarSetList).ListMeta}
for _, item := range obj.(*v1alpha1.SidecarSetList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
}
return list, err
}
// Watch returns a watch.Interface that watches the requested sidecarSets.
func (c *FakeSidecarSets) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewRootWatchAction(sidecarsetsResource, opts))
}
// Create takes the representation of a sidecarSet and creates it. Returns the server's representation of the sidecarSet, and an error, if there is any.
func (c *FakeSidecarSets) Create(ctx context.Context, sidecarSet *v1alpha1.SidecarSet, opts v1.CreateOptions) (result *v1alpha1.SidecarSet, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootCreateAction(sidecarsetsResource, sidecarSet), &v1alpha1.SidecarSet{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.SidecarSet), err
}
// Update takes the representation of a sidecarSet and updates it. Returns the server's representation of the sidecarSet, and an error, if there is any.
func (c *FakeSidecarSets) Update(ctx context.Context, sidecarSet *v1alpha1.SidecarSet, opts v1.UpdateOptions) (result *v1alpha1.SidecarSet, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootUpdateAction(sidecarsetsResource, sidecarSet), &v1alpha1.SidecarSet{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.SidecarSet), err
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *FakeSidecarSets) UpdateStatus(ctx context.Context, sidecarSet *v1alpha1.SidecarSet, opts v1.UpdateOptions) (*v1alpha1.SidecarSet, error) {
obj, err := c.Fake.
Invokes(testing.NewRootUpdateSubresourceAction(sidecarsetsResource, "status", sidecarSet), &v1alpha1.SidecarSet{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.SidecarSet), err
}
// Delete takes name of the sidecarSet and deletes it. Returns an error if one occurs.
func (c *FakeSidecarSets) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewRootDeleteActionWithOptions(sidecarsetsResource, name, opts), &v1alpha1.SidecarSet{})
return err
}
// DeleteCollection deletes a collection of objects.
func (c *FakeSidecarSets) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewRootDeleteCollectionAction(sidecarsetsResource, listOpts)
_, err := c.Fake.Invokes(action, &v1alpha1.SidecarSetList{})
return err
}
// Patch applies the patch and returns the patched sidecarSet.
func (c *FakeSidecarSets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.SidecarSet, err error) {
obj, err := c.Fake.
Invokes(testing.NewRootPatchSubresourceAction(sidecarsetsResource, name, pt, data, subresources...), &v1alpha1.SidecarSet{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.SidecarSet), err
} }

View File

@ -18,146 +18,63 @@ limitations under the License.
package fake package fake
import ( import (
"context" context "context"
v1alpha1 "github.com/openkruise/kruise/apis/apps/v1alpha1" v1alpha1 "github.com/openkruise/kruise/apis/apps/v1alpha1"
appsv1alpha1 "github.com/openkruise/kruise/pkg/client/clientset/versioned/typed/apps/v1alpha1"
autoscalingv1 "k8s.io/api/autoscaling/v1" autoscalingv1 "k8s.io/api/autoscaling/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels" gentype "k8s.io/client-go/gentype"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
testing "k8s.io/client-go/testing" testing "k8s.io/client-go/testing"
) )
// FakeStatefulSets implements StatefulSetInterface // fakeStatefulSets implements StatefulSetInterface
type FakeStatefulSets struct { type fakeStatefulSets struct {
*gentype.FakeClientWithList[*v1alpha1.StatefulSet, *v1alpha1.StatefulSetList]
Fake *FakeAppsV1alpha1 Fake *FakeAppsV1alpha1
ns string
} }
var statefulsetsResource = v1alpha1.SchemeGroupVersion.WithResource("statefulsets") func newFakeStatefulSets(fake *FakeAppsV1alpha1, namespace string) appsv1alpha1.StatefulSetInterface {
return &fakeStatefulSets{
var statefulsetsKind = v1alpha1.SchemeGroupVersion.WithKind("StatefulSet") gentype.NewFakeClientWithList[*v1alpha1.StatefulSet, *v1alpha1.StatefulSetList](
fake.Fake,
// Get takes name of the statefulSet, and returns the corresponding statefulSet object, and an error if there is any. namespace,
func (c *FakeStatefulSets) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.StatefulSet, err error) { v1alpha1.SchemeGroupVersion.WithResource("statefulsets"),
obj, err := c.Fake. v1alpha1.SchemeGroupVersion.WithKind("StatefulSet"),
Invokes(testing.NewGetAction(statefulsetsResource, c.ns, name), &v1alpha1.StatefulSet{}) func() *v1alpha1.StatefulSet { return &v1alpha1.StatefulSet{} },
func() *v1alpha1.StatefulSetList { return &v1alpha1.StatefulSetList{} },
if obj == nil { func(dst, src *v1alpha1.StatefulSetList) { dst.ListMeta = src.ListMeta },
return nil, err func(list *v1alpha1.StatefulSetList) []*v1alpha1.StatefulSet {
return gentype.ToPointerSlice(list.Items)
},
func(list *v1alpha1.StatefulSetList, items []*v1alpha1.StatefulSet) {
list.Items = gentype.FromPointerSlice(items)
},
),
fake,
} }
return obj.(*v1alpha1.StatefulSet), err
}
// List takes label and field selectors, and returns the list of StatefulSets that match those selectors.
func (c *FakeStatefulSets) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.StatefulSetList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(statefulsetsResource, statefulsetsKind, c.ns, opts), &v1alpha1.StatefulSetList{})
if obj == nil {
return nil, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
if label == nil {
label = labels.Everything()
}
list := &v1alpha1.StatefulSetList{ListMeta: obj.(*v1alpha1.StatefulSetList).ListMeta}
for _, item := range obj.(*v1alpha1.StatefulSetList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
}
return list, err
}
// Watch returns a watch.Interface that watches the requested statefulSets.
func (c *FakeStatefulSets) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(statefulsetsResource, c.ns, opts))
}
// Create takes the representation of a statefulSet and creates it. Returns the server's representation of the statefulSet, and an error, if there is any.
func (c *FakeStatefulSets) Create(ctx context.Context, statefulSet *v1alpha1.StatefulSet, opts v1.CreateOptions) (result *v1alpha1.StatefulSet, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(statefulsetsResource, c.ns, statefulSet), &v1alpha1.StatefulSet{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.StatefulSet), err
}
// Update takes the representation of a statefulSet and updates it. Returns the server's representation of the statefulSet, and an error, if there is any.
func (c *FakeStatefulSets) Update(ctx context.Context, statefulSet *v1alpha1.StatefulSet, opts v1.UpdateOptions) (result *v1alpha1.StatefulSet, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(statefulsetsResource, c.ns, statefulSet), &v1alpha1.StatefulSet{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.StatefulSet), err
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *FakeStatefulSets) UpdateStatus(ctx context.Context, statefulSet *v1alpha1.StatefulSet, opts v1.UpdateOptions) (*v1alpha1.StatefulSet, error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(statefulsetsResource, "status", c.ns, statefulSet), &v1alpha1.StatefulSet{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.StatefulSet), err
}
// Delete takes name of the statefulSet and deletes it. Returns an error if one occurs.
func (c *FakeStatefulSets) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteActionWithOptions(statefulsetsResource, c.ns, name, opts), &v1alpha1.StatefulSet{})
return err
}
// DeleteCollection deletes a collection of objects.
func (c *FakeStatefulSets) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(statefulsetsResource, c.ns, listOpts)
_, err := c.Fake.Invokes(action, &v1alpha1.StatefulSetList{})
return err
}
// Patch applies the patch and returns the patched statefulSet.
func (c *FakeStatefulSets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.StatefulSet, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(statefulsetsResource, c.ns, name, pt, data, subresources...), &v1alpha1.StatefulSet{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.StatefulSet), err
} }
// GetScale takes name of the statefulSet, and returns the corresponding scale object, and an error if there is any. // GetScale takes name of the statefulSet, and returns the corresponding scale object, and an error if there is any.
func (c *FakeStatefulSets) GetScale(ctx context.Context, statefulSetName string, options v1.GetOptions) (result *autoscalingv1.Scale, err error) { func (c *fakeStatefulSets) GetScale(ctx context.Context, statefulSetName string, options v1.GetOptions) (result *autoscalingv1.Scale, err error) {
emptyResult := &autoscalingv1.Scale{}
obj, err := c.Fake. obj, err := c.Fake.
Invokes(testing.NewGetSubresourceAction(statefulsetsResource, c.ns, "scale", statefulSetName), &autoscalingv1.Scale{}) Invokes(testing.NewGetSubresourceActionWithOptions(c.Resource(), c.Namespace(), "scale", statefulSetName, options), emptyResult)
if obj == nil { if obj == nil {
return nil, err return emptyResult, err
} }
return obj.(*autoscalingv1.Scale), err return obj.(*autoscalingv1.Scale), err
} }
// UpdateScale takes the representation of a scale and updates it. Returns the server's representation of the scale, and an error, if there is any. // UpdateScale takes the representation of a scale and updates it. Returns the server's representation of the scale, and an error, if there is any.
func (c *FakeStatefulSets) UpdateScale(ctx context.Context, statefulSetName string, scale *autoscalingv1.Scale, opts v1.UpdateOptions) (result *autoscalingv1.Scale, err error) { func (c *fakeStatefulSets) UpdateScale(ctx context.Context, statefulSetName string, scale *autoscalingv1.Scale, opts v1.UpdateOptions) (result *autoscalingv1.Scale, err error) {
emptyResult := &autoscalingv1.Scale{}
obj, err := c.Fake. obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(statefulsetsResource, "scale", c.ns, scale), &autoscalingv1.Scale{}) Invokes(testing.NewUpdateSubresourceActionWithOptions(c.Resource(), "scale", c.Namespace(), scale, opts), &autoscalingv1.Scale{})
if obj == nil { if obj == nil {
return nil, err return emptyResult, err
} }
return obj.(*autoscalingv1.Scale), err return obj.(*autoscalingv1.Scale), err
} }

View File

@ -18,146 +18,63 @@ limitations under the License.
package fake package fake
import ( import (
"context" context "context"
v1alpha1 "github.com/openkruise/kruise/apis/apps/v1alpha1" v1alpha1 "github.com/openkruise/kruise/apis/apps/v1alpha1"
appsv1alpha1 "github.com/openkruise/kruise/pkg/client/clientset/versioned/typed/apps/v1alpha1"
autoscalingv1 "k8s.io/api/autoscaling/v1" autoscalingv1 "k8s.io/api/autoscaling/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels" gentype "k8s.io/client-go/gentype"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
testing "k8s.io/client-go/testing" testing "k8s.io/client-go/testing"
) )
// FakeUnitedDeployments implements UnitedDeploymentInterface // fakeUnitedDeployments implements UnitedDeploymentInterface
type FakeUnitedDeployments struct { type fakeUnitedDeployments struct {
*gentype.FakeClientWithList[*v1alpha1.UnitedDeployment, *v1alpha1.UnitedDeploymentList]
Fake *FakeAppsV1alpha1 Fake *FakeAppsV1alpha1
ns string
} }
var uniteddeploymentsResource = v1alpha1.SchemeGroupVersion.WithResource("uniteddeployments") func newFakeUnitedDeployments(fake *FakeAppsV1alpha1, namespace string) appsv1alpha1.UnitedDeploymentInterface {
return &fakeUnitedDeployments{
var uniteddeploymentsKind = v1alpha1.SchemeGroupVersion.WithKind("UnitedDeployment") gentype.NewFakeClientWithList[*v1alpha1.UnitedDeployment, *v1alpha1.UnitedDeploymentList](
fake.Fake,
// Get takes name of the unitedDeployment, and returns the corresponding unitedDeployment object, and an error if there is any. namespace,
func (c *FakeUnitedDeployments) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.UnitedDeployment, err error) { v1alpha1.SchemeGroupVersion.WithResource("uniteddeployments"),
obj, err := c.Fake. v1alpha1.SchemeGroupVersion.WithKind("UnitedDeployment"),
Invokes(testing.NewGetAction(uniteddeploymentsResource, c.ns, name), &v1alpha1.UnitedDeployment{}) func() *v1alpha1.UnitedDeployment { return &v1alpha1.UnitedDeployment{} },
func() *v1alpha1.UnitedDeploymentList { return &v1alpha1.UnitedDeploymentList{} },
if obj == nil { func(dst, src *v1alpha1.UnitedDeploymentList) { dst.ListMeta = src.ListMeta },
return nil, err func(list *v1alpha1.UnitedDeploymentList) []*v1alpha1.UnitedDeployment {
return gentype.ToPointerSlice(list.Items)
},
func(list *v1alpha1.UnitedDeploymentList, items []*v1alpha1.UnitedDeployment) {
list.Items = gentype.FromPointerSlice(items)
},
),
fake,
} }
return obj.(*v1alpha1.UnitedDeployment), err
}
// List takes label and field selectors, and returns the list of UnitedDeployments that match those selectors.
func (c *FakeUnitedDeployments) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.UnitedDeploymentList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(uniteddeploymentsResource, uniteddeploymentsKind, c.ns, opts), &v1alpha1.UnitedDeploymentList{})
if obj == nil {
return nil, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
if label == nil {
label = labels.Everything()
}
list := &v1alpha1.UnitedDeploymentList{ListMeta: obj.(*v1alpha1.UnitedDeploymentList).ListMeta}
for _, item := range obj.(*v1alpha1.UnitedDeploymentList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
}
return list, err
}
// Watch returns a watch.Interface that watches the requested unitedDeployments.
func (c *FakeUnitedDeployments) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(uniteddeploymentsResource, c.ns, opts))
}
// Create takes the representation of a unitedDeployment and creates it. Returns the server's representation of the unitedDeployment, and an error, if there is any.
func (c *FakeUnitedDeployments) Create(ctx context.Context, unitedDeployment *v1alpha1.UnitedDeployment, opts v1.CreateOptions) (result *v1alpha1.UnitedDeployment, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(uniteddeploymentsResource, c.ns, unitedDeployment), &v1alpha1.UnitedDeployment{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.UnitedDeployment), err
}
// Update takes the representation of a unitedDeployment and updates it. Returns the server's representation of the unitedDeployment, and an error, if there is any.
func (c *FakeUnitedDeployments) Update(ctx context.Context, unitedDeployment *v1alpha1.UnitedDeployment, opts v1.UpdateOptions) (result *v1alpha1.UnitedDeployment, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(uniteddeploymentsResource, c.ns, unitedDeployment), &v1alpha1.UnitedDeployment{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.UnitedDeployment), err
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *FakeUnitedDeployments) UpdateStatus(ctx context.Context, unitedDeployment *v1alpha1.UnitedDeployment, opts v1.UpdateOptions) (*v1alpha1.UnitedDeployment, error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(uniteddeploymentsResource, "status", c.ns, unitedDeployment), &v1alpha1.UnitedDeployment{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.UnitedDeployment), err
}
// Delete takes name of the unitedDeployment and deletes it. Returns an error if one occurs.
func (c *FakeUnitedDeployments) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteActionWithOptions(uniteddeploymentsResource, c.ns, name, opts), &v1alpha1.UnitedDeployment{})
return err
}
// DeleteCollection deletes a collection of objects.
func (c *FakeUnitedDeployments) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(uniteddeploymentsResource, c.ns, listOpts)
_, err := c.Fake.Invokes(action, &v1alpha1.UnitedDeploymentList{})
return err
}
// Patch applies the patch and returns the patched unitedDeployment.
func (c *FakeUnitedDeployments) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.UnitedDeployment, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(uniteddeploymentsResource, c.ns, name, pt, data, subresources...), &v1alpha1.UnitedDeployment{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.UnitedDeployment), err
} }
// GetScale takes name of the unitedDeployment, and returns the corresponding scale object, and an error if there is any. // GetScale takes name of the unitedDeployment, and returns the corresponding scale object, and an error if there is any.
func (c *FakeUnitedDeployments) GetScale(ctx context.Context, unitedDeploymentName string, options v1.GetOptions) (result *autoscalingv1.Scale, err error) { func (c *fakeUnitedDeployments) GetScale(ctx context.Context, unitedDeploymentName string, options v1.GetOptions) (result *autoscalingv1.Scale, err error) {
emptyResult := &autoscalingv1.Scale{}
obj, err := c.Fake. obj, err := c.Fake.
Invokes(testing.NewGetSubresourceAction(uniteddeploymentsResource, c.ns, "scale", unitedDeploymentName), &autoscalingv1.Scale{}) Invokes(testing.NewGetSubresourceActionWithOptions(c.Resource(), c.Namespace(), "scale", unitedDeploymentName, options), emptyResult)
if obj == nil { if obj == nil {
return nil, err return emptyResult, err
} }
return obj.(*autoscalingv1.Scale), err return obj.(*autoscalingv1.Scale), err
} }
// UpdateScale takes the representation of a scale and updates it. Returns the server's representation of the scale, and an error, if there is any. // UpdateScale takes the representation of a scale and updates it. Returns the server's representation of the scale, and an error, if there is any.
func (c *FakeUnitedDeployments) UpdateScale(ctx context.Context, unitedDeploymentName string, scale *autoscalingv1.Scale, opts v1.UpdateOptions) (result *autoscalingv1.Scale, err error) { func (c *fakeUnitedDeployments) UpdateScale(ctx context.Context, unitedDeploymentName string, scale *autoscalingv1.Scale, opts v1.UpdateOptions) (result *autoscalingv1.Scale, err error) {
emptyResult := &autoscalingv1.Scale{}
obj, err := c.Fake. obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(uniteddeploymentsResource, "scale", c.ns, scale), &autoscalingv1.Scale{}) Invokes(testing.NewUpdateSubresourceActionWithOptions(c.Resource(), "scale", c.Namespace(), scale, opts), &autoscalingv1.Scale{})
if obj == nil { if obj == nil {
return nil, err return emptyResult, err
} }
return obj.(*autoscalingv1.Scale), err return obj.(*autoscalingv1.Scale), err
} }

View File

@ -18,123 +18,34 @@ limitations under the License.
package fake package fake
import ( import (
"context"
v1alpha1 "github.com/openkruise/kruise/apis/apps/v1alpha1" v1alpha1 "github.com/openkruise/kruise/apis/apps/v1alpha1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1" appsv1alpha1 "github.com/openkruise/kruise/pkg/client/clientset/versioned/typed/apps/v1alpha1"
labels "k8s.io/apimachinery/pkg/labels" gentype "k8s.io/client-go/gentype"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
testing "k8s.io/client-go/testing"
) )
// FakeWorkloadSpreads implements WorkloadSpreadInterface // fakeWorkloadSpreads implements WorkloadSpreadInterface
type FakeWorkloadSpreads struct { type fakeWorkloadSpreads struct {
*gentype.FakeClientWithList[*v1alpha1.WorkloadSpread, *v1alpha1.WorkloadSpreadList]
Fake *FakeAppsV1alpha1 Fake *FakeAppsV1alpha1
ns string
} }
var workloadspreadsResource = v1alpha1.SchemeGroupVersion.WithResource("workloadspreads") func newFakeWorkloadSpreads(fake *FakeAppsV1alpha1, namespace string) appsv1alpha1.WorkloadSpreadInterface {
return &fakeWorkloadSpreads{
var workloadspreadsKind = v1alpha1.SchemeGroupVersion.WithKind("WorkloadSpread") gentype.NewFakeClientWithList[*v1alpha1.WorkloadSpread, *v1alpha1.WorkloadSpreadList](
fake.Fake,
// Get takes name of the workloadSpread, and returns the corresponding workloadSpread object, and an error if there is any. namespace,
func (c *FakeWorkloadSpreads) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.WorkloadSpread, err error) { v1alpha1.SchemeGroupVersion.WithResource("workloadspreads"),
obj, err := c.Fake. v1alpha1.SchemeGroupVersion.WithKind("WorkloadSpread"),
Invokes(testing.NewGetAction(workloadspreadsResource, c.ns, name), &v1alpha1.WorkloadSpread{}) func() *v1alpha1.WorkloadSpread { return &v1alpha1.WorkloadSpread{} },
func() *v1alpha1.WorkloadSpreadList { return &v1alpha1.WorkloadSpreadList{} },
if obj == nil { func(dst, src *v1alpha1.WorkloadSpreadList) { dst.ListMeta = src.ListMeta },
return nil, err func(list *v1alpha1.WorkloadSpreadList) []*v1alpha1.WorkloadSpread {
return gentype.ToPointerSlice(list.Items)
},
func(list *v1alpha1.WorkloadSpreadList, items []*v1alpha1.WorkloadSpread) {
list.Items = gentype.FromPointerSlice(items)
},
),
fake,
} }
return obj.(*v1alpha1.WorkloadSpread), err
}
// List takes label and field selectors, and returns the list of WorkloadSpreads that match those selectors.
func (c *FakeWorkloadSpreads) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.WorkloadSpreadList, err error) {
obj, err := c.Fake.
Invokes(testing.NewListAction(workloadspreadsResource, workloadspreadsKind, c.ns, opts), &v1alpha1.WorkloadSpreadList{})
if obj == nil {
return nil, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
if label == nil {
label = labels.Everything()
}
list := &v1alpha1.WorkloadSpreadList{ListMeta: obj.(*v1alpha1.WorkloadSpreadList).ListMeta}
for _, item := range obj.(*v1alpha1.WorkloadSpreadList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
}
return list, err
}
// Watch returns a watch.Interface that watches the requested workloadSpreads.
func (c *FakeWorkloadSpreads) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(testing.NewWatchAction(workloadspreadsResource, c.ns, opts))
}
// Create takes the representation of a workloadSpread and creates it. Returns the server's representation of the workloadSpread, and an error, if there is any.
func (c *FakeWorkloadSpreads) Create(ctx context.Context, workloadSpread *v1alpha1.WorkloadSpread, opts v1.CreateOptions) (result *v1alpha1.WorkloadSpread, err error) {
obj, err := c.Fake.
Invokes(testing.NewCreateAction(workloadspreadsResource, c.ns, workloadSpread), &v1alpha1.WorkloadSpread{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.WorkloadSpread), err
}
// Update takes the representation of a workloadSpread and updates it. Returns the server's representation of the workloadSpread, and an error, if there is any.
func (c *FakeWorkloadSpreads) Update(ctx context.Context, workloadSpread *v1alpha1.WorkloadSpread, opts v1.UpdateOptions) (result *v1alpha1.WorkloadSpread, err error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateAction(workloadspreadsResource, c.ns, workloadSpread), &v1alpha1.WorkloadSpread{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.WorkloadSpread), err
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *FakeWorkloadSpreads) UpdateStatus(ctx context.Context, workloadSpread *v1alpha1.WorkloadSpread, opts v1.UpdateOptions) (*v1alpha1.WorkloadSpread, error) {
obj, err := c.Fake.
Invokes(testing.NewUpdateSubresourceAction(workloadspreadsResource, "status", c.ns, workloadSpread), &v1alpha1.WorkloadSpread{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.WorkloadSpread), err
}
// Delete takes name of the workloadSpread and deletes it. Returns an error if one occurs.
func (c *FakeWorkloadSpreads) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
_, err := c.Fake.
Invokes(testing.NewDeleteActionWithOptions(workloadspreadsResource, c.ns, name, opts), &v1alpha1.WorkloadSpread{})
return err
}
// DeleteCollection deletes a collection of objects.
func (c *FakeWorkloadSpreads) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
action := testing.NewDeleteCollectionAction(workloadspreadsResource, c.ns, listOpts)
_, err := c.Fake.Invokes(action, &v1alpha1.WorkloadSpreadList{})
return err
}
// Patch applies the patch and returns the patched workloadSpread.
func (c *FakeWorkloadSpreads) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.WorkloadSpread, err error) {
obj, err := c.Fake.
Invokes(testing.NewPatchSubresourceAction(workloadspreadsResource, c.ns, name, pt, data, subresources...), &v1alpha1.WorkloadSpread{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.WorkloadSpread), err
} }

View File

@ -18,15 +18,14 @@ limitations under the License.
package v1alpha1 package v1alpha1
import ( import (
"context" context "context"
"time"
v1alpha1 "github.com/openkruise/kruise/apis/apps/v1alpha1" appsv1alpha1 "github.com/openkruise/kruise/apis/apps/v1alpha1"
scheme "github.com/openkruise/kruise/pkg/client/clientset/versioned/scheme" scheme "github.com/openkruise/kruise/pkg/client/clientset/versioned/scheme"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types" types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch" watch "k8s.io/apimachinery/pkg/watch"
rest "k8s.io/client-go/rest" gentype "k8s.io/client-go/gentype"
) )
// ImageListPullJobsGetter has a method to return a ImageListPullJobInterface. // ImageListPullJobsGetter has a method to return a ImageListPullJobInterface.
@ -37,158 +36,34 @@ type ImageListPullJobsGetter interface {
// ImageListPullJobInterface has methods to work with ImageListPullJob resources. // ImageListPullJobInterface has methods to work with ImageListPullJob resources.
type ImageListPullJobInterface interface { type ImageListPullJobInterface interface {
Create(ctx context.Context, imageListPullJob *v1alpha1.ImageListPullJob, opts v1.CreateOptions) (*v1alpha1.ImageListPullJob, error) Create(ctx context.Context, imageListPullJob *appsv1alpha1.ImageListPullJob, opts v1.CreateOptions) (*appsv1alpha1.ImageListPullJob, error)
Update(ctx context.Context, imageListPullJob *v1alpha1.ImageListPullJob, opts v1.UpdateOptions) (*v1alpha1.ImageListPullJob, error) Update(ctx context.Context, imageListPullJob *appsv1alpha1.ImageListPullJob, opts v1.UpdateOptions) (*appsv1alpha1.ImageListPullJob, error)
UpdateStatus(ctx context.Context, imageListPullJob *v1alpha1.ImageListPullJob, opts v1.UpdateOptions) (*v1alpha1.ImageListPullJob, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
UpdateStatus(ctx context.Context, imageListPullJob *appsv1alpha1.ImageListPullJob, opts v1.UpdateOptions) (*appsv1alpha1.ImageListPullJob, error)
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.ImageListPullJob, error) Get(ctx context.Context, name string, opts v1.GetOptions) (*appsv1alpha1.ImageListPullJob, error)
List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.ImageListPullJobList, error) List(ctx context.Context, opts v1.ListOptions) (*appsv1alpha1.ImageListPullJobList, error)
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ImageListPullJob, err error) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *appsv1alpha1.ImageListPullJob, err error)
ImageListPullJobExpansion ImageListPullJobExpansion
} }
// imageListPullJobs implements ImageListPullJobInterface // imageListPullJobs implements ImageListPullJobInterface
type imageListPullJobs struct { type imageListPullJobs struct {
client rest.Interface *gentype.ClientWithList[*appsv1alpha1.ImageListPullJob, *appsv1alpha1.ImageListPullJobList]
ns string
} }
// newImageListPullJobs returns a ImageListPullJobs // newImageListPullJobs returns a ImageListPullJobs
func newImageListPullJobs(c *AppsV1alpha1Client, namespace string) *imageListPullJobs { func newImageListPullJobs(c *AppsV1alpha1Client, namespace string) *imageListPullJobs {
return &imageListPullJobs{ return &imageListPullJobs{
client: c.RESTClient(), gentype.NewClientWithList[*appsv1alpha1.ImageListPullJob, *appsv1alpha1.ImageListPullJobList](
ns: namespace, "imagelistpulljobs",
c.RESTClient(),
scheme.ParameterCodec,
namespace,
func() *appsv1alpha1.ImageListPullJob { return &appsv1alpha1.ImageListPullJob{} },
func() *appsv1alpha1.ImageListPullJobList { return &appsv1alpha1.ImageListPullJobList{} },
),
} }
} }
// Get takes name of the imageListPullJob, and returns the corresponding imageListPullJob object, and an error if there is any.
func (c *imageListPullJobs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.ImageListPullJob, err error) {
result = &v1alpha1.ImageListPullJob{}
err = c.client.Get().
Namespace(c.ns).
Resource("imagelistpulljobs").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of ImageListPullJobs that match those selectors.
func (c *imageListPullJobs) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.ImageListPullJobList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1alpha1.ImageListPullJobList{}
err = c.client.Get().
Namespace(c.ns).
Resource("imagelistpulljobs").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested imageListPullJobs.
func (c *imageListPullJobs) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
Resource("imagelistpulljobs").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(ctx)
}
// Create takes the representation of a imageListPullJob and creates it. Returns the server's representation of the imageListPullJob, and an error, if there is any.
func (c *imageListPullJobs) Create(ctx context.Context, imageListPullJob *v1alpha1.ImageListPullJob, opts v1.CreateOptions) (result *v1alpha1.ImageListPullJob, err error) {
result = &v1alpha1.ImageListPullJob{}
err = c.client.Post().
Namespace(c.ns).
Resource("imagelistpulljobs").
VersionedParams(&opts, scheme.ParameterCodec).
Body(imageListPullJob).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a imageListPullJob and updates it. Returns the server's representation of the imageListPullJob, and an error, if there is any.
func (c *imageListPullJobs) Update(ctx context.Context, imageListPullJob *v1alpha1.ImageListPullJob, opts v1.UpdateOptions) (result *v1alpha1.ImageListPullJob, err error) {
result = &v1alpha1.ImageListPullJob{}
err = c.client.Put().
Namespace(c.ns).
Resource("imagelistpulljobs").
Name(imageListPullJob.Name).
VersionedParams(&opts, scheme.ParameterCodec).
Body(imageListPullJob).
Do(ctx).
Into(result)
return
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *imageListPullJobs) UpdateStatus(ctx context.Context, imageListPullJob *v1alpha1.ImageListPullJob, opts v1.UpdateOptions) (result *v1alpha1.ImageListPullJob, err error) {
result = &v1alpha1.ImageListPullJob{}
err = c.client.Put().
Namespace(c.ns).
Resource("imagelistpulljobs").
Name(imageListPullJob.Name).
SubResource("status").
VersionedParams(&opts, scheme.ParameterCodec).
Body(imageListPullJob).
Do(ctx).
Into(result)
return
}
// Delete takes name of the imageListPullJob and deletes it. Returns an error if one occurs.
func (c *imageListPullJobs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("imagelistpulljobs").
Name(name).
Body(&opts).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *imageListPullJobs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
var timeout time.Duration
if listOpts.TimeoutSeconds != nil {
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Namespace(c.ns).
Resource("imagelistpulljobs").
VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout).
Body(&opts).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched imageListPullJob.
func (c *imageListPullJobs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ImageListPullJob, err error) {
result = &v1alpha1.ImageListPullJob{}
err = c.client.Patch(pt).
Namespace(c.ns).
Resource("imagelistpulljobs").
Name(name).
SubResource(subresources...).
VersionedParams(&opts, scheme.ParameterCodec).
Body(data).
Do(ctx).
Into(result)
return
}

View File

@ -18,15 +18,14 @@ limitations under the License.
package v1alpha1 package v1alpha1
import ( import (
"context" context "context"
"time"
v1alpha1 "github.com/openkruise/kruise/apis/apps/v1alpha1" appsv1alpha1 "github.com/openkruise/kruise/apis/apps/v1alpha1"
scheme "github.com/openkruise/kruise/pkg/client/clientset/versioned/scheme" scheme "github.com/openkruise/kruise/pkg/client/clientset/versioned/scheme"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types" types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch" watch "k8s.io/apimachinery/pkg/watch"
rest "k8s.io/client-go/rest" gentype "k8s.io/client-go/gentype"
) )
// ImagePullJobsGetter has a method to return a ImagePullJobInterface. // ImagePullJobsGetter has a method to return a ImagePullJobInterface.
@ -37,158 +36,34 @@ type ImagePullJobsGetter interface {
// ImagePullJobInterface has methods to work with ImagePullJob resources. // ImagePullJobInterface has methods to work with ImagePullJob resources.
type ImagePullJobInterface interface { type ImagePullJobInterface interface {
Create(ctx context.Context, imagePullJob *v1alpha1.ImagePullJob, opts v1.CreateOptions) (*v1alpha1.ImagePullJob, error) Create(ctx context.Context, imagePullJob *appsv1alpha1.ImagePullJob, opts v1.CreateOptions) (*appsv1alpha1.ImagePullJob, error)
Update(ctx context.Context, imagePullJob *v1alpha1.ImagePullJob, opts v1.UpdateOptions) (*v1alpha1.ImagePullJob, error) Update(ctx context.Context, imagePullJob *appsv1alpha1.ImagePullJob, opts v1.UpdateOptions) (*appsv1alpha1.ImagePullJob, error)
UpdateStatus(ctx context.Context, imagePullJob *v1alpha1.ImagePullJob, opts v1.UpdateOptions) (*v1alpha1.ImagePullJob, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
UpdateStatus(ctx context.Context, imagePullJob *appsv1alpha1.ImagePullJob, opts v1.UpdateOptions) (*appsv1alpha1.ImagePullJob, error)
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.ImagePullJob, error) Get(ctx context.Context, name string, opts v1.GetOptions) (*appsv1alpha1.ImagePullJob, error)
List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.ImagePullJobList, error) List(ctx context.Context, opts v1.ListOptions) (*appsv1alpha1.ImagePullJobList, error)
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ImagePullJob, err error) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *appsv1alpha1.ImagePullJob, err error)
ImagePullJobExpansion ImagePullJobExpansion
} }
// imagePullJobs implements ImagePullJobInterface // imagePullJobs implements ImagePullJobInterface
type imagePullJobs struct { type imagePullJobs struct {
client rest.Interface *gentype.ClientWithList[*appsv1alpha1.ImagePullJob, *appsv1alpha1.ImagePullJobList]
ns string
} }
// newImagePullJobs returns a ImagePullJobs // newImagePullJobs returns a ImagePullJobs
func newImagePullJobs(c *AppsV1alpha1Client, namespace string) *imagePullJobs { func newImagePullJobs(c *AppsV1alpha1Client, namespace string) *imagePullJobs {
return &imagePullJobs{ return &imagePullJobs{
client: c.RESTClient(), gentype.NewClientWithList[*appsv1alpha1.ImagePullJob, *appsv1alpha1.ImagePullJobList](
ns: namespace, "imagepulljobs",
c.RESTClient(),
scheme.ParameterCodec,
namespace,
func() *appsv1alpha1.ImagePullJob { return &appsv1alpha1.ImagePullJob{} },
func() *appsv1alpha1.ImagePullJobList { return &appsv1alpha1.ImagePullJobList{} },
),
} }
} }
// Get takes name of the imagePullJob, and returns the corresponding imagePullJob object, and an error if there is any.
func (c *imagePullJobs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.ImagePullJob, err error) {
result = &v1alpha1.ImagePullJob{}
err = c.client.Get().
Namespace(c.ns).
Resource("imagepulljobs").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of ImagePullJobs that match those selectors.
func (c *imagePullJobs) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.ImagePullJobList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1alpha1.ImagePullJobList{}
err = c.client.Get().
Namespace(c.ns).
Resource("imagepulljobs").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested imagePullJobs.
func (c *imagePullJobs) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
Resource("imagepulljobs").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(ctx)
}
// Create takes the representation of a imagePullJob and creates it. Returns the server's representation of the imagePullJob, and an error, if there is any.
func (c *imagePullJobs) Create(ctx context.Context, imagePullJob *v1alpha1.ImagePullJob, opts v1.CreateOptions) (result *v1alpha1.ImagePullJob, err error) {
result = &v1alpha1.ImagePullJob{}
err = c.client.Post().
Namespace(c.ns).
Resource("imagepulljobs").
VersionedParams(&opts, scheme.ParameterCodec).
Body(imagePullJob).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a imagePullJob and updates it. Returns the server's representation of the imagePullJob, and an error, if there is any.
func (c *imagePullJobs) Update(ctx context.Context, imagePullJob *v1alpha1.ImagePullJob, opts v1.UpdateOptions) (result *v1alpha1.ImagePullJob, err error) {
result = &v1alpha1.ImagePullJob{}
err = c.client.Put().
Namespace(c.ns).
Resource("imagepulljobs").
Name(imagePullJob.Name).
VersionedParams(&opts, scheme.ParameterCodec).
Body(imagePullJob).
Do(ctx).
Into(result)
return
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *imagePullJobs) UpdateStatus(ctx context.Context, imagePullJob *v1alpha1.ImagePullJob, opts v1.UpdateOptions) (result *v1alpha1.ImagePullJob, err error) {
result = &v1alpha1.ImagePullJob{}
err = c.client.Put().
Namespace(c.ns).
Resource("imagepulljobs").
Name(imagePullJob.Name).
SubResource("status").
VersionedParams(&opts, scheme.ParameterCodec).
Body(imagePullJob).
Do(ctx).
Into(result)
return
}
// Delete takes name of the imagePullJob and deletes it. Returns an error if one occurs.
func (c *imagePullJobs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("imagepulljobs").
Name(name).
Body(&opts).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *imagePullJobs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
var timeout time.Duration
if listOpts.TimeoutSeconds != nil {
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Namespace(c.ns).
Resource("imagepulljobs").
VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout).
Body(&opts).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched imagePullJob.
func (c *imagePullJobs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ImagePullJob, err error) {
result = &v1alpha1.ImagePullJob{}
err = c.client.Patch(pt).
Namespace(c.ns).
Resource("imagepulljobs").
Name(name).
SubResource(subresources...).
VersionedParams(&opts, scheme.ParameterCodec).
Body(data).
Do(ctx).
Into(result)
return
}

View File

@ -18,15 +18,14 @@ limitations under the License.
package v1alpha1 package v1alpha1
import ( import (
"context" context "context"
"time"
v1alpha1 "github.com/openkruise/kruise/apis/apps/v1alpha1" appsv1alpha1 "github.com/openkruise/kruise/apis/apps/v1alpha1"
scheme "github.com/openkruise/kruise/pkg/client/clientset/versioned/scheme" scheme "github.com/openkruise/kruise/pkg/client/clientset/versioned/scheme"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types" types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch" watch "k8s.io/apimachinery/pkg/watch"
rest "k8s.io/client-go/rest" gentype "k8s.io/client-go/gentype"
) )
// NodeImagesGetter has a method to return a NodeImageInterface. // NodeImagesGetter has a method to return a NodeImageInterface.
@ -37,147 +36,34 @@ type NodeImagesGetter interface {
// NodeImageInterface has methods to work with NodeImage resources. // NodeImageInterface has methods to work with NodeImage resources.
type NodeImageInterface interface { type NodeImageInterface interface {
Create(ctx context.Context, nodeImage *v1alpha1.NodeImage, opts v1.CreateOptions) (*v1alpha1.NodeImage, error) Create(ctx context.Context, nodeImage *appsv1alpha1.NodeImage, opts v1.CreateOptions) (*appsv1alpha1.NodeImage, error)
Update(ctx context.Context, nodeImage *v1alpha1.NodeImage, opts v1.UpdateOptions) (*v1alpha1.NodeImage, error) Update(ctx context.Context, nodeImage *appsv1alpha1.NodeImage, opts v1.UpdateOptions) (*appsv1alpha1.NodeImage, error)
UpdateStatus(ctx context.Context, nodeImage *v1alpha1.NodeImage, opts v1.UpdateOptions) (*v1alpha1.NodeImage, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
UpdateStatus(ctx context.Context, nodeImage *appsv1alpha1.NodeImage, opts v1.UpdateOptions) (*appsv1alpha1.NodeImage, error)
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.NodeImage, error) Get(ctx context.Context, name string, opts v1.GetOptions) (*appsv1alpha1.NodeImage, error)
List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.NodeImageList, error) List(ctx context.Context, opts v1.ListOptions) (*appsv1alpha1.NodeImageList, error)
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.NodeImage, err error) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *appsv1alpha1.NodeImage, err error)
NodeImageExpansion NodeImageExpansion
} }
// nodeImages implements NodeImageInterface // nodeImages implements NodeImageInterface
type nodeImages struct { type nodeImages struct {
client rest.Interface *gentype.ClientWithList[*appsv1alpha1.NodeImage, *appsv1alpha1.NodeImageList]
} }
// newNodeImages returns a NodeImages // newNodeImages returns a NodeImages
func newNodeImages(c *AppsV1alpha1Client) *nodeImages { func newNodeImages(c *AppsV1alpha1Client) *nodeImages {
return &nodeImages{ return &nodeImages{
client: c.RESTClient(), gentype.NewClientWithList[*appsv1alpha1.NodeImage, *appsv1alpha1.NodeImageList](
"nodeimages",
c.RESTClient(),
scheme.ParameterCodec,
"",
func() *appsv1alpha1.NodeImage { return &appsv1alpha1.NodeImage{} },
func() *appsv1alpha1.NodeImageList { return &appsv1alpha1.NodeImageList{} },
),
} }
} }
// Get takes name of the nodeImage, and returns the corresponding nodeImage object, and an error if there is any.
func (c *nodeImages) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.NodeImage, err error) {
result = &v1alpha1.NodeImage{}
err = c.client.Get().
Resource("nodeimages").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of NodeImages that match those selectors.
func (c *nodeImages) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.NodeImageList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1alpha1.NodeImageList{}
err = c.client.Get().
Resource("nodeimages").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested nodeImages.
func (c *nodeImages) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Resource("nodeimages").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(ctx)
}
// Create takes the representation of a nodeImage and creates it. Returns the server's representation of the nodeImage, and an error, if there is any.
func (c *nodeImages) Create(ctx context.Context, nodeImage *v1alpha1.NodeImage, opts v1.CreateOptions) (result *v1alpha1.NodeImage, err error) {
result = &v1alpha1.NodeImage{}
err = c.client.Post().
Resource("nodeimages").
VersionedParams(&opts, scheme.ParameterCodec).
Body(nodeImage).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a nodeImage and updates it. Returns the server's representation of the nodeImage, and an error, if there is any.
func (c *nodeImages) Update(ctx context.Context, nodeImage *v1alpha1.NodeImage, opts v1.UpdateOptions) (result *v1alpha1.NodeImage, err error) {
result = &v1alpha1.NodeImage{}
err = c.client.Put().
Resource("nodeimages").
Name(nodeImage.Name).
VersionedParams(&opts, scheme.ParameterCodec).
Body(nodeImage).
Do(ctx).
Into(result)
return
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *nodeImages) UpdateStatus(ctx context.Context, nodeImage *v1alpha1.NodeImage, opts v1.UpdateOptions) (result *v1alpha1.NodeImage, err error) {
result = &v1alpha1.NodeImage{}
err = c.client.Put().
Resource("nodeimages").
Name(nodeImage.Name).
SubResource("status").
VersionedParams(&opts, scheme.ParameterCodec).
Body(nodeImage).
Do(ctx).
Into(result)
return
}
// Delete takes name of the nodeImage and deletes it. Returns an error if one occurs.
func (c *nodeImages) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
return c.client.Delete().
Resource("nodeimages").
Name(name).
Body(&opts).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *nodeImages) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
var timeout time.Duration
if listOpts.TimeoutSeconds != nil {
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Resource("nodeimages").
VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout).
Body(&opts).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched nodeImage.
func (c *nodeImages) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.NodeImage, err error) {
result = &v1alpha1.NodeImage{}
err = c.client.Patch(pt).
Resource("nodeimages").
Name(name).
SubResource(subresources...).
VersionedParams(&opts, scheme.ParameterCodec).
Body(data).
Do(ctx).
Into(result)
return
}

View File

@ -18,15 +18,14 @@ limitations under the License.
package v1alpha1 package v1alpha1
import ( import (
"context" context "context"
"time"
v1alpha1 "github.com/openkruise/kruise/apis/apps/v1alpha1" appsv1alpha1 "github.com/openkruise/kruise/apis/apps/v1alpha1"
scheme "github.com/openkruise/kruise/pkg/client/clientset/versioned/scheme" scheme "github.com/openkruise/kruise/pkg/client/clientset/versioned/scheme"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types" types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch" watch "k8s.io/apimachinery/pkg/watch"
rest "k8s.io/client-go/rest" gentype "k8s.io/client-go/gentype"
) )
// NodePodProbesGetter has a method to return a NodePodProbeInterface. // NodePodProbesGetter has a method to return a NodePodProbeInterface.
@ -37,147 +36,34 @@ type NodePodProbesGetter interface {
// NodePodProbeInterface has methods to work with NodePodProbe resources. // NodePodProbeInterface has methods to work with NodePodProbe resources.
type NodePodProbeInterface interface { type NodePodProbeInterface interface {
Create(ctx context.Context, nodePodProbe *v1alpha1.NodePodProbe, opts v1.CreateOptions) (*v1alpha1.NodePodProbe, error) Create(ctx context.Context, nodePodProbe *appsv1alpha1.NodePodProbe, opts v1.CreateOptions) (*appsv1alpha1.NodePodProbe, error)
Update(ctx context.Context, nodePodProbe *v1alpha1.NodePodProbe, opts v1.UpdateOptions) (*v1alpha1.NodePodProbe, error) Update(ctx context.Context, nodePodProbe *appsv1alpha1.NodePodProbe, opts v1.UpdateOptions) (*appsv1alpha1.NodePodProbe, error)
UpdateStatus(ctx context.Context, nodePodProbe *v1alpha1.NodePodProbe, opts v1.UpdateOptions) (*v1alpha1.NodePodProbe, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
UpdateStatus(ctx context.Context, nodePodProbe *appsv1alpha1.NodePodProbe, opts v1.UpdateOptions) (*appsv1alpha1.NodePodProbe, error)
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.NodePodProbe, error) Get(ctx context.Context, name string, opts v1.GetOptions) (*appsv1alpha1.NodePodProbe, error)
List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.NodePodProbeList, error) List(ctx context.Context, opts v1.ListOptions) (*appsv1alpha1.NodePodProbeList, error)
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.NodePodProbe, err error) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *appsv1alpha1.NodePodProbe, err error)
NodePodProbeExpansion NodePodProbeExpansion
} }
// nodePodProbes implements NodePodProbeInterface // nodePodProbes implements NodePodProbeInterface
type nodePodProbes struct { type nodePodProbes struct {
client rest.Interface *gentype.ClientWithList[*appsv1alpha1.NodePodProbe, *appsv1alpha1.NodePodProbeList]
} }
// newNodePodProbes returns a NodePodProbes // newNodePodProbes returns a NodePodProbes
func newNodePodProbes(c *AppsV1alpha1Client) *nodePodProbes { func newNodePodProbes(c *AppsV1alpha1Client) *nodePodProbes {
return &nodePodProbes{ return &nodePodProbes{
client: c.RESTClient(), gentype.NewClientWithList[*appsv1alpha1.NodePodProbe, *appsv1alpha1.NodePodProbeList](
"nodepodprobes",
c.RESTClient(),
scheme.ParameterCodec,
"",
func() *appsv1alpha1.NodePodProbe { return &appsv1alpha1.NodePodProbe{} },
func() *appsv1alpha1.NodePodProbeList { return &appsv1alpha1.NodePodProbeList{} },
),
} }
} }
// Get takes name of the nodePodProbe, and returns the corresponding nodePodProbe object, and an error if there is any.
func (c *nodePodProbes) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.NodePodProbe, err error) {
result = &v1alpha1.NodePodProbe{}
err = c.client.Get().
Resource("nodepodprobes").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of NodePodProbes that match those selectors.
func (c *nodePodProbes) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.NodePodProbeList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1alpha1.NodePodProbeList{}
err = c.client.Get().
Resource("nodepodprobes").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested nodePodProbes.
func (c *nodePodProbes) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Resource("nodepodprobes").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(ctx)
}
// Create takes the representation of a nodePodProbe and creates it. Returns the server's representation of the nodePodProbe, and an error, if there is any.
func (c *nodePodProbes) Create(ctx context.Context, nodePodProbe *v1alpha1.NodePodProbe, opts v1.CreateOptions) (result *v1alpha1.NodePodProbe, err error) {
result = &v1alpha1.NodePodProbe{}
err = c.client.Post().
Resource("nodepodprobes").
VersionedParams(&opts, scheme.ParameterCodec).
Body(nodePodProbe).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a nodePodProbe and updates it. Returns the server's representation of the nodePodProbe, and an error, if there is any.
func (c *nodePodProbes) Update(ctx context.Context, nodePodProbe *v1alpha1.NodePodProbe, opts v1.UpdateOptions) (result *v1alpha1.NodePodProbe, err error) {
result = &v1alpha1.NodePodProbe{}
err = c.client.Put().
Resource("nodepodprobes").
Name(nodePodProbe.Name).
VersionedParams(&opts, scheme.ParameterCodec).
Body(nodePodProbe).
Do(ctx).
Into(result)
return
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *nodePodProbes) UpdateStatus(ctx context.Context, nodePodProbe *v1alpha1.NodePodProbe, opts v1.UpdateOptions) (result *v1alpha1.NodePodProbe, err error) {
result = &v1alpha1.NodePodProbe{}
err = c.client.Put().
Resource("nodepodprobes").
Name(nodePodProbe.Name).
SubResource("status").
VersionedParams(&opts, scheme.ParameterCodec).
Body(nodePodProbe).
Do(ctx).
Into(result)
return
}
// Delete takes name of the nodePodProbe and deletes it. Returns an error if one occurs.
func (c *nodePodProbes) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
return c.client.Delete().
Resource("nodepodprobes").
Name(name).
Body(&opts).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *nodePodProbes) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
var timeout time.Duration
if listOpts.TimeoutSeconds != nil {
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Resource("nodepodprobes").
VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout).
Body(&opts).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched nodePodProbe.
func (c *nodePodProbes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.NodePodProbe, err error) {
result = &v1alpha1.NodePodProbe{}
err = c.client.Patch(pt).
Resource("nodepodprobes").
Name(name).
SubResource(subresources...).
VersionedParams(&opts, scheme.ParameterCodec).
Body(data).
Do(ctx).
Into(result)
return
}

View File

@ -18,15 +18,14 @@ limitations under the License.
package v1alpha1 package v1alpha1
import ( import (
"context" context "context"
"time"
v1alpha1 "github.com/openkruise/kruise/apis/apps/v1alpha1" appsv1alpha1 "github.com/openkruise/kruise/apis/apps/v1alpha1"
scheme "github.com/openkruise/kruise/pkg/client/clientset/versioned/scheme" scheme "github.com/openkruise/kruise/pkg/client/clientset/versioned/scheme"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types" types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch" watch "k8s.io/apimachinery/pkg/watch"
rest "k8s.io/client-go/rest" gentype "k8s.io/client-go/gentype"
) )
// PersistentPodStatesGetter has a method to return a PersistentPodStateInterface. // PersistentPodStatesGetter has a method to return a PersistentPodStateInterface.
@ -37,158 +36,34 @@ type PersistentPodStatesGetter interface {
// PersistentPodStateInterface has methods to work with PersistentPodState resources. // PersistentPodStateInterface has methods to work with PersistentPodState resources.
type PersistentPodStateInterface interface { type PersistentPodStateInterface interface {
Create(ctx context.Context, persistentPodState *v1alpha1.PersistentPodState, opts v1.CreateOptions) (*v1alpha1.PersistentPodState, error) Create(ctx context.Context, persistentPodState *appsv1alpha1.PersistentPodState, opts v1.CreateOptions) (*appsv1alpha1.PersistentPodState, error)
Update(ctx context.Context, persistentPodState *v1alpha1.PersistentPodState, opts v1.UpdateOptions) (*v1alpha1.PersistentPodState, error) Update(ctx context.Context, persistentPodState *appsv1alpha1.PersistentPodState, opts v1.UpdateOptions) (*appsv1alpha1.PersistentPodState, error)
UpdateStatus(ctx context.Context, persistentPodState *v1alpha1.PersistentPodState, opts v1.UpdateOptions) (*v1alpha1.PersistentPodState, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
UpdateStatus(ctx context.Context, persistentPodState *appsv1alpha1.PersistentPodState, opts v1.UpdateOptions) (*appsv1alpha1.PersistentPodState, error)
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.PersistentPodState, error) Get(ctx context.Context, name string, opts v1.GetOptions) (*appsv1alpha1.PersistentPodState, error)
List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.PersistentPodStateList, error) List(ctx context.Context, opts v1.ListOptions) (*appsv1alpha1.PersistentPodStateList, error)
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.PersistentPodState, err error) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *appsv1alpha1.PersistentPodState, err error)
PersistentPodStateExpansion PersistentPodStateExpansion
} }
// persistentPodStates implements PersistentPodStateInterface // persistentPodStates implements PersistentPodStateInterface
type persistentPodStates struct { type persistentPodStates struct {
client rest.Interface *gentype.ClientWithList[*appsv1alpha1.PersistentPodState, *appsv1alpha1.PersistentPodStateList]
ns string
} }
// newPersistentPodStates returns a PersistentPodStates // newPersistentPodStates returns a PersistentPodStates
func newPersistentPodStates(c *AppsV1alpha1Client, namespace string) *persistentPodStates { func newPersistentPodStates(c *AppsV1alpha1Client, namespace string) *persistentPodStates {
return &persistentPodStates{ return &persistentPodStates{
client: c.RESTClient(), gentype.NewClientWithList[*appsv1alpha1.PersistentPodState, *appsv1alpha1.PersistentPodStateList](
ns: namespace, "persistentpodstates",
c.RESTClient(),
scheme.ParameterCodec,
namespace,
func() *appsv1alpha1.PersistentPodState { return &appsv1alpha1.PersistentPodState{} },
func() *appsv1alpha1.PersistentPodStateList { return &appsv1alpha1.PersistentPodStateList{} },
),
} }
} }
// Get takes name of the persistentPodState, and returns the corresponding persistentPodState object, and an error if there is any.
func (c *persistentPodStates) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.PersistentPodState, err error) {
result = &v1alpha1.PersistentPodState{}
err = c.client.Get().
Namespace(c.ns).
Resource("persistentpodstates").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of PersistentPodStates that match those selectors.
func (c *persistentPodStates) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.PersistentPodStateList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1alpha1.PersistentPodStateList{}
err = c.client.Get().
Namespace(c.ns).
Resource("persistentpodstates").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested persistentPodStates.
func (c *persistentPodStates) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
Resource("persistentpodstates").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(ctx)
}
// Create takes the representation of a persistentPodState and creates it. Returns the server's representation of the persistentPodState, and an error, if there is any.
func (c *persistentPodStates) Create(ctx context.Context, persistentPodState *v1alpha1.PersistentPodState, opts v1.CreateOptions) (result *v1alpha1.PersistentPodState, err error) {
result = &v1alpha1.PersistentPodState{}
err = c.client.Post().
Namespace(c.ns).
Resource("persistentpodstates").
VersionedParams(&opts, scheme.ParameterCodec).
Body(persistentPodState).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a persistentPodState and updates it. Returns the server's representation of the persistentPodState, and an error, if there is any.
func (c *persistentPodStates) Update(ctx context.Context, persistentPodState *v1alpha1.PersistentPodState, opts v1.UpdateOptions) (result *v1alpha1.PersistentPodState, err error) {
result = &v1alpha1.PersistentPodState{}
err = c.client.Put().
Namespace(c.ns).
Resource("persistentpodstates").
Name(persistentPodState.Name).
VersionedParams(&opts, scheme.ParameterCodec).
Body(persistentPodState).
Do(ctx).
Into(result)
return
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *persistentPodStates) UpdateStatus(ctx context.Context, persistentPodState *v1alpha1.PersistentPodState, opts v1.UpdateOptions) (result *v1alpha1.PersistentPodState, err error) {
result = &v1alpha1.PersistentPodState{}
err = c.client.Put().
Namespace(c.ns).
Resource("persistentpodstates").
Name(persistentPodState.Name).
SubResource("status").
VersionedParams(&opts, scheme.ParameterCodec).
Body(persistentPodState).
Do(ctx).
Into(result)
return
}
// Delete takes name of the persistentPodState and deletes it. Returns an error if one occurs.
func (c *persistentPodStates) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("persistentpodstates").
Name(name).
Body(&opts).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *persistentPodStates) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
var timeout time.Duration
if listOpts.TimeoutSeconds != nil {
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Namespace(c.ns).
Resource("persistentpodstates").
VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout).
Body(&opts).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched persistentPodState.
func (c *persistentPodStates) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.PersistentPodState, err error) {
result = &v1alpha1.PersistentPodState{}
err = c.client.Patch(pt).
Namespace(c.ns).
Resource("persistentpodstates").
Name(name).
SubResource(subresources...).
VersionedParams(&opts, scheme.ParameterCodec).
Body(data).
Do(ctx).
Into(result)
return
}

View File

@ -18,15 +18,14 @@ limitations under the License.
package v1alpha1 package v1alpha1
import ( import (
"context" context "context"
"time"
v1alpha1 "github.com/openkruise/kruise/apis/apps/v1alpha1" appsv1alpha1 "github.com/openkruise/kruise/apis/apps/v1alpha1"
scheme "github.com/openkruise/kruise/pkg/client/clientset/versioned/scheme" scheme "github.com/openkruise/kruise/pkg/client/clientset/versioned/scheme"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types" types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch" watch "k8s.io/apimachinery/pkg/watch"
rest "k8s.io/client-go/rest" gentype "k8s.io/client-go/gentype"
) )
// PodProbeMarkersGetter has a method to return a PodProbeMarkerInterface. // PodProbeMarkersGetter has a method to return a PodProbeMarkerInterface.
@ -37,158 +36,34 @@ type PodProbeMarkersGetter interface {
// PodProbeMarkerInterface has methods to work with PodProbeMarker resources. // PodProbeMarkerInterface has methods to work with PodProbeMarker resources.
type PodProbeMarkerInterface interface { type PodProbeMarkerInterface interface {
Create(ctx context.Context, podProbeMarker *v1alpha1.PodProbeMarker, opts v1.CreateOptions) (*v1alpha1.PodProbeMarker, error) Create(ctx context.Context, podProbeMarker *appsv1alpha1.PodProbeMarker, opts v1.CreateOptions) (*appsv1alpha1.PodProbeMarker, error)
Update(ctx context.Context, podProbeMarker *v1alpha1.PodProbeMarker, opts v1.UpdateOptions) (*v1alpha1.PodProbeMarker, error) Update(ctx context.Context, podProbeMarker *appsv1alpha1.PodProbeMarker, opts v1.UpdateOptions) (*appsv1alpha1.PodProbeMarker, error)
UpdateStatus(ctx context.Context, podProbeMarker *v1alpha1.PodProbeMarker, opts v1.UpdateOptions) (*v1alpha1.PodProbeMarker, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
UpdateStatus(ctx context.Context, podProbeMarker *appsv1alpha1.PodProbeMarker, opts v1.UpdateOptions) (*appsv1alpha1.PodProbeMarker, error)
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.PodProbeMarker, error) Get(ctx context.Context, name string, opts v1.GetOptions) (*appsv1alpha1.PodProbeMarker, error)
List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.PodProbeMarkerList, error) List(ctx context.Context, opts v1.ListOptions) (*appsv1alpha1.PodProbeMarkerList, error)
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.PodProbeMarker, err error) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *appsv1alpha1.PodProbeMarker, err error)
PodProbeMarkerExpansion PodProbeMarkerExpansion
} }
// podProbeMarkers implements PodProbeMarkerInterface // podProbeMarkers implements PodProbeMarkerInterface
type podProbeMarkers struct { type podProbeMarkers struct {
client rest.Interface *gentype.ClientWithList[*appsv1alpha1.PodProbeMarker, *appsv1alpha1.PodProbeMarkerList]
ns string
} }
// newPodProbeMarkers returns a PodProbeMarkers // newPodProbeMarkers returns a PodProbeMarkers
func newPodProbeMarkers(c *AppsV1alpha1Client, namespace string) *podProbeMarkers { func newPodProbeMarkers(c *AppsV1alpha1Client, namespace string) *podProbeMarkers {
return &podProbeMarkers{ return &podProbeMarkers{
client: c.RESTClient(), gentype.NewClientWithList[*appsv1alpha1.PodProbeMarker, *appsv1alpha1.PodProbeMarkerList](
ns: namespace, "podprobemarkers",
c.RESTClient(),
scheme.ParameterCodec,
namespace,
func() *appsv1alpha1.PodProbeMarker { return &appsv1alpha1.PodProbeMarker{} },
func() *appsv1alpha1.PodProbeMarkerList { return &appsv1alpha1.PodProbeMarkerList{} },
),
} }
} }
// Get takes name of the podProbeMarker, and returns the corresponding podProbeMarker object, and an error if there is any.
func (c *podProbeMarkers) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.PodProbeMarker, err error) {
result = &v1alpha1.PodProbeMarker{}
err = c.client.Get().
Namespace(c.ns).
Resource("podprobemarkers").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of PodProbeMarkers that match those selectors.
func (c *podProbeMarkers) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.PodProbeMarkerList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1alpha1.PodProbeMarkerList{}
err = c.client.Get().
Namespace(c.ns).
Resource("podprobemarkers").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested podProbeMarkers.
func (c *podProbeMarkers) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
Resource("podprobemarkers").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(ctx)
}
// Create takes the representation of a podProbeMarker and creates it. Returns the server's representation of the podProbeMarker, and an error, if there is any.
func (c *podProbeMarkers) Create(ctx context.Context, podProbeMarker *v1alpha1.PodProbeMarker, opts v1.CreateOptions) (result *v1alpha1.PodProbeMarker, err error) {
result = &v1alpha1.PodProbeMarker{}
err = c.client.Post().
Namespace(c.ns).
Resource("podprobemarkers").
VersionedParams(&opts, scheme.ParameterCodec).
Body(podProbeMarker).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a podProbeMarker and updates it. Returns the server's representation of the podProbeMarker, and an error, if there is any.
func (c *podProbeMarkers) Update(ctx context.Context, podProbeMarker *v1alpha1.PodProbeMarker, opts v1.UpdateOptions) (result *v1alpha1.PodProbeMarker, err error) {
result = &v1alpha1.PodProbeMarker{}
err = c.client.Put().
Namespace(c.ns).
Resource("podprobemarkers").
Name(podProbeMarker.Name).
VersionedParams(&opts, scheme.ParameterCodec).
Body(podProbeMarker).
Do(ctx).
Into(result)
return
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *podProbeMarkers) UpdateStatus(ctx context.Context, podProbeMarker *v1alpha1.PodProbeMarker, opts v1.UpdateOptions) (result *v1alpha1.PodProbeMarker, err error) {
result = &v1alpha1.PodProbeMarker{}
err = c.client.Put().
Namespace(c.ns).
Resource("podprobemarkers").
Name(podProbeMarker.Name).
SubResource("status").
VersionedParams(&opts, scheme.ParameterCodec).
Body(podProbeMarker).
Do(ctx).
Into(result)
return
}
// Delete takes name of the podProbeMarker and deletes it. Returns an error if one occurs.
func (c *podProbeMarkers) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("podprobemarkers").
Name(name).
Body(&opts).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *podProbeMarkers) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
var timeout time.Duration
if listOpts.TimeoutSeconds != nil {
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Namespace(c.ns).
Resource("podprobemarkers").
VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout).
Body(&opts).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched podProbeMarker.
func (c *podProbeMarkers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.PodProbeMarker, err error) {
result = &v1alpha1.PodProbeMarker{}
err = c.client.Patch(pt).
Namespace(c.ns).
Resource("podprobemarkers").
Name(name).
SubResource(subresources...).
VersionedParams(&opts, scheme.ParameterCodec).
Body(data).
Do(ctx).
Into(result)
return
}

View File

@ -18,15 +18,14 @@ limitations under the License.
package v1alpha1 package v1alpha1
import ( import (
"context" context "context"
"time"
v1alpha1 "github.com/openkruise/kruise/apis/apps/v1alpha1" appsv1alpha1 "github.com/openkruise/kruise/apis/apps/v1alpha1"
scheme "github.com/openkruise/kruise/pkg/client/clientset/versioned/scheme" scheme "github.com/openkruise/kruise/pkg/client/clientset/versioned/scheme"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types" types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch" watch "k8s.io/apimachinery/pkg/watch"
rest "k8s.io/client-go/rest" gentype "k8s.io/client-go/gentype"
) )
// ResourceDistributionsGetter has a method to return a ResourceDistributionInterface. // ResourceDistributionsGetter has a method to return a ResourceDistributionInterface.
@ -37,147 +36,34 @@ type ResourceDistributionsGetter interface {
// ResourceDistributionInterface has methods to work with ResourceDistribution resources. // ResourceDistributionInterface has methods to work with ResourceDistribution resources.
type ResourceDistributionInterface interface { type ResourceDistributionInterface interface {
Create(ctx context.Context, resourceDistribution *v1alpha1.ResourceDistribution, opts v1.CreateOptions) (*v1alpha1.ResourceDistribution, error) Create(ctx context.Context, resourceDistribution *appsv1alpha1.ResourceDistribution, opts v1.CreateOptions) (*appsv1alpha1.ResourceDistribution, error)
Update(ctx context.Context, resourceDistribution *v1alpha1.ResourceDistribution, opts v1.UpdateOptions) (*v1alpha1.ResourceDistribution, error) Update(ctx context.Context, resourceDistribution *appsv1alpha1.ResourceDistribution, opts v1.UpdateOptions) (*appsv1alpha1.ResourceDistribution, error)
UpdateStatus(ctx context.Context, resourceDistribution *v1alpha1.ResourceDistribution, opts v1.UpdateOptions) (*v1alpha1.ResourceDistribution, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
UpdateStatus(ctx context.Context, resourceDistribution *appsv1alpha1.ResourceDistribution, opts v1.UpdateOptions) (*appsv1alpha1.ResourceDistribution, error)
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.ResourceDistribution, error) Get(ctx context.Context, name string, opts v1.GetOptions) (*appsv1alpha1.ResourceDistribution, error)
List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.ResourceDistributionList, error) List(ctx context.Context, opts v1.ListOptions) (*appsv1alpha1.ResourceDistributionList, error)
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ResourceDistribution, err error) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *appsv1alpha1.ResourceDistribution, err error)
ResourceDistributionExpansion ResourceDistributionExpansion
} }
// resourceDistributions implements ResourceDistributionInterface // resourceDistributions implements ResourceDistributionInterface
type resourceDistributions struct { type resourceDistributions struct {
client rest.Interface *gentype.ClientWithList[*appsv1alpha1.ResourceDistribution, *appsv1alpha1.ResourceDistributionList]
} }
// newResourceDistributions returns a ResourceDistributions // newResourceDistributions returns a ResourceDistributions
func newResourceDistributions(c *AppsV1alpha1Client) *resourceDistributions { func newResourceDistributions(c *AppsV1alpha1Client) *resourceDistributions {
return &resourceDistributions{ return &resourceDistributions{
client: c.RESTClient(), gentype.NewClientWithList[*appsv1alpha1.ResourceDistribution, *appsv1alpha1.ResourceDistributionList](
"resourcedistributions",
c.RESTClient(),
scheme.ParameterCodec,
"",
func() *appsv1alpha1.ResourceDistribution { return &appsv1alpha1.ResourceDistribution{} },
func() *appsv1alpha1.ResourceDistributionList { return &appsv1alpha1.ResourceDistributionList{} },
),
} }
} }
// Get takes name of the resourceDistribution, and returns the corresponding resourceDistribution object, and an error if there is any.
func (c *resourceDistributions) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.ResourceDistribution, err error) {
result = &v1alpha1.ResourceDistribution{}
err = c.client.Get().
Resource("resourcedistributions").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of ResourceDistributions that match those selectors.
func (c *resourceDistributions) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.ResourceDistributionList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1alpha1.ResourceDistributionList{}
err = c.client.Get().
Resource("resourcedistributions").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested resourceDistributions.
func (c *resourceDistributions) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Resource("resourcedistributions").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(ctx)
}
// Create takes the representation of a resourceDistribution and creates it. Returns the server's representation of the resourceDistribution, and an error, if there is any.
func (c *resourceDistributions) Create(ctx context.Context, resourceDistribution *v1alpha1.ResourceDistribution, opts v1.CreateOptions) (result *v1alpha1.ResourceDistribution, err error) {
result = &v1alpha1.ResourceDistribution{}
err = c.client.Post().
Resource("resourcedistributions").
VersionedParams(&opts, scheme.ParameterCodec).
Body(resourceDistribution).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a resourceDistribution and updates it. Returns the server's representation of the resourceDistribution, and an error, if there is any.
func (c *resourceDistributions) Update(ctx context.Context, resourceDistribution *v1alpha1.ResourceDistribution, opts v1.UpdateOptions) (result *v1alpha1.ResourceDistribution, err error) {
result = &v1alpha1.ResourceDistribution{}
err = c.client.Put().
Resource("resourcedistributions").
Name(resourceDistribution.Name).
VersionedParams(&opts, scheme.ParameterCodec).
Body(resourceDistribution).
Do(ctx).
Into(result)
return
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *resourceDistributions) UpdateStatus(ctx context.Context, resourceDistribution *v1alpha1.ResourceDistribution, opts v1.UpdateOptions) (result *v1alpha1.ResourceDistribution, err error) {
result = &v1alpha1.ResourceDistribution{}
err = c.client.Put().
Resource("resourcedistributions").
Name(resourceDistribution.Name).
SubResource("status").
VersionedParams(&opts, scheme.ParameterCodec).
Body(resourceDistribution).
Do(ctx).
Into(result)
return
}
// Delete takes name of the resourceDistribution and deletes it. Returns an error if one occurs.
func (c *resourceDistributions) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
return c.client.Delete().
Resource("resourcedistributions").
Name(name).
Body(&opts).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *resourceDistributions) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
var timeout time.Duration
if listOpts.TimeoutSeconds != nil {
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Resource("resourcedistributions").
VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout).
Body(&opts).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched resourceDistribution.
func (c *resourceDistributions) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ResourceDistribution, err error) {
result = &v1alpha1.ResourceDistribution{}
err = c.client.Patch(pt).
Resource("resourcedistributions").
Name(name).
SubResource(subresources...).
VersionedParams(&opts, scheme.ParameterCodec).
Body(data).
Do(ctx).
Into(result)
return
}

View File

@ -18,15 +18,14 @@ limitations under the License.
package v1alpha1 package v1alpha1
import ( import (
"context" context "context"
"time"
v1alpha1 "github.com/openkruise/kruise/apis/apps/v1alpha1" appsv1alpha1 "github.com/openkruise/kruise/apis/apps/v1alpha1"
scheme "github.com/openkruise/kruise/pkg/client/clientset/versioned/scheme" scheme "github.com/openkruise/kruise/pkg/client/clientset/versioned/scheme"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types" types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch" watch "k8s.io/apimachinery/pkg/watch"
rest "k8s.io/client-go/rest" gentype "k8s.io/client-go/gentype"
) )
// SidecarSetsGetter has a method to return a SidecarSetInterface. // SidecarSetsGetter has a method to return a SidecarSetInterface.
@ -37,147 +36,34 @@ type SidecarSetsGetter interface {
// SidecarSetInterface has methods to work with SidecarSet resources. // SidecarSetInterface has methods to work with SidecarSet resources.
type SidecarSetInterface interface { type SidecarSetInterface interface {
Create(ctx context.Context, sidecarSet *v1alpha1.SidecarSet, opts v1.CreateOptions) (*v1alpha1.SidecarSet, error) Create(ctx context.Context, sidecarSet *appsv1alpha1.SidecarSet, opts v1.CreateOptions) (*appsv1alpha1.SidecarSet, error)
Update(ctx context.Context, sidecarSet *v1alpha1.SidecarSet, opts v1.UpdateOptions) (*v1alpha1.SidecarSet, error) Update(ctx context.Context, sidecarSet *appsv1alpha1.SidecarSet, opts v1.UpdateOptions) (*appsv1alpha1.SidecarSet, error)
UpdateStatus(ctx context.Context, sidecarSet *v1alpha1.SidecarSet, opts v1.UpdateOptions) (*v1alpha1.SidecarSet, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
UpdateStatus(ctx context.Context, sidecarSet *appsv1alpha1.SidecarSet, opts v1.UpdateOptions) (*appsv1alpha1.SidecarSet, error)
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.SidecarSet, error) Get(ctx context.Context, name string, opts v1.GetOptions) (*appsv1alpha1.SidecarSet, error)
List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.SidecarSetList, error) List(ctx context.Context, opts v1.ListOptions) (*appsv1alpha1.SidecarSetList, error)
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.SidecarSet, err error) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *appsv1alpha1.SidecarSet, err error)
SidecarSetExpansion SidecarSetExpansion
} }
// sidecarSets implements SidecarSetInterface // sidecarSets implements SidecarSetInterface
type sidecarSets struct { type sidecarSets struct {
client rest.Interface *gentype.ClientWithList[*appsv1alpha1.SidecarSet, *appsv1alpha1.SidecarSetList]
} }
// newSidecarSets returns a SidecarSets // newSidecarSets returns a SidecarSets
func newSidecarSets(c *AppsV1alpha1Client) *sidecarSets { func newSidecarSets(c *AppsV1alpha1Client) *sidecarSets {
return &sidecarSets{ return &sidecarSets{
client: c.RESTClient(), gentype.NewClientWithList[*appsv1alpha1.SidecarSet, *appsv1alpha1.SidecarSetList](
"sidecarsets",
c.RESTClient(),
scheme.ParameterCodec,
"",
func() *appsv1alpha1.SidecarSet { return &appsv1alpha1.SidecarSet{} },
func() *appsv1alpha1.SidecarSetList { return &appsv1alpha1.SidecarSetList{} },
),
} }
} }
// Get takes name of the sidecarSet, and returns the corresponding sidecarSet object, and an error if there is any.
func (c *sidecarSets) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.SidecarSet, err error) {
result = &v1alpha1.SidecarSet{}
err = c.client.Get().
Resource("sidecarsets").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of SidecarSets that match those selectors.
func (c *sidecarSets) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.SidecarSetList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1alpha1.SidecarSetList{}
err = c.client.Get().
Resource("sidecarsets").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested sidecarSets.
func (c *sidecarSets) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Resource("sidecarsets").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(ctx)
}
// Create takes the representation of a sidecarSet and creates it. Returns the server's representation of the sidecarSet, and an error, if there is any.
func (c *sidecarSets) Create(ctx context.Context, sidecarSet *v1alpha1.SidecarSet, opts v1.CreateOptions) (result *v1alpha1.SidecarSet, err error) {
result = &v1alpha1.SidecarSet{}
err = c.client.Post().
Resource("sidecarsets").
VersionedParams(&opts, scheme.ParameterCodec).
Body(sidecarSet).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a sidecarSet and updates it. Returns the server's representation of the sidecarSet, and an error, if there is any.
func (c *sidecarSets) Update(ctx context.Context, sidecarSet *v1alpha1.SidecarSet, opts v1.UpdateOptions) (result *v1alpha1.SidecarSet, err error) {
result = &v1alpha1.SidecarSet{}
err = c.client.Put().
Resource("sidecarsets").
Name(sidecarSet.Name).
VersionedParams(&opts, scheme.ParameterCodec).
Body(sidecarSet).
Do(ctx).
Into(result)
return
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *sidecarSets) UpdateStatus(ctx context.Context, sidecarSet *v1alpha1.SidecarSet, opts v1.UpdateOptions) (result *v1alpha1.SidecarSet, err error) {
result = &v1alpha1.SidecarSet{}
err = c.client.Put().
Resource("sidecarsets").
Name(sidecarSet.Name).
SubResource("status").
VersionedParams(&opts, scheme.ParameterCodec).
Body(sidecarSet).
Do(ctx).
Into(result)
return
}
// Delete takes name of the sidecarSet and deletes it. Returns an error if one occurs.
func (c *sidecarSets) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
return c.client.Delete().
Resource("sidecarsets").
Name(name).
Body(&opts).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *sidecarSets) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
var timeout time.Duration
if listOpts.TimeoutSeconds != nil {
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Resource("sidecarsets").
VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout).
Body(&opts).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched sidecarSet.
func (c *sidecarSets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.SidecarSet, err error) {
result = &v1alpha1.SidecarSet{}
err = c.client.Patch(pt).
Resource("sidecarsets").
Name(name).
SubResource(subresources...).
VersionedParams(&opts, scheme.ParameterCodec).
Body(data).
Do(ctx).
Into(result)
return
}

View File

@ -18,16 +18,15 @@ limitations under the License.
package v1alpha1 package v1alpha1
import ( import (
"context" context "context"
"time"
v1alpha1 "github.com/openkruise/kruise/apis/apps/v1alpha1" appsv1alpha1 "github.com/openkruise/kruise/apis/apps/v1alpha1"
scheme "github.com/openkruise/kruise/pkg/client/clientset/versioned/scheme" scheme "github.com/openkruise/kruise/pkg/client/clientset/versioned/scheme"
autoscalingv1 "k8s.io/api/autoscaling/v1" autoscalingv1 "k8s.io/api/autoscaling/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types" types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch" watch "k8s.io/apimachinery/pkg/watch"
rest "k8s.io/client-go/rest" gentype "k8s.io/client-go/gentype"
) )
// StatefulSetsGetter has a method to return a StatefulSetInterface. // StatefulSetsGetter has a method to return a StatefulSetInterface.
@ -38,15 +37,16 @@ type StatefulSetsGetter interface {
// StatefulSetInterface has methods to work with StatefulSet resources. // StatefulSetInterface has methods to work with StatefulSet resources.
type StatefulSetInterface interface { type StatefulSetInterface interface {
Create(ctx context.Context, statefulSet *v1alpha1.StatefulSet, opts v1.CreateOptions) (*v1alpha1.StatefulSet, error) Create(ctx context.Context, statefulSet *appsv1alpha1.StatefulSet, opts v1.CreateOptions) (*appsv1alpha1.StatefulSet, error)
Update(ctx context.Context, statefulSet *v1alpha1.StatefulSet, opts v1.UpdateOptions) (*v1alpha1.StatefulSet, error) Update(ctx context.Context, statefulSet *appsv1alpha1.StatefulSet, opts v1.UpdateOptions) (*appsv1alpha1.StatefulSet, error)
UpdateStatus(ctx context.Context, statefulSet *v1alpha1.StatefulSet, opts v1.UpdateOptions) (*v1alpha1.StatefulSet, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
UpdateStatus(ctx context.Context, statefulSet *appsv1alpha1.StatefulSet, opts v1.UpdateOptions) (*appsv1alpha1.StatefulSet, error)
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.StatefulSet, error) Get(ctx context.Context, name string, opts v1.GetOptions) (*appsv1alpha1.StatefulSet, error)
List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.StatefulSetList, error) List(ctx context.Context, opts v1.ListOptions) (*appsv1alpha1.StatefulSetList, error)
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.StatefulSet, err error) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *appsv1alpha1.StatefulSet, err error)
GetScale(ctx context.Context, statefulSetName string, options v1.GetOptions) (*autoscalingv1.Scale, error) GetScale(ctx context.Context, statefulSetName string, options v1.GetOptions) (*autoscalingv1.Scale, error)
UpdateScale(ctx context.Context, statefulSetName string, scale *autoscalingv1.Scale, opts v1.UpdateOptions) (*autoscalingv1.Scale, error) UpdateScale(ctx context.Context, statefulSetName string, scale *autoscalingv1.Scale, opts v1.UpdateOptions) (*autoscalingv1.Scale, error)
@ -55,153 +55,28 @@ type StatefulSetInterface interface {
// statefulSets implements StatefulSetInterface // statefulSets implements StatefulSetInterface
type statefulSets struct { type statefulSets struct {
client rest.Interface *gentype.ClientWithList[*appsv1alpha1.StatefulSet, *appsv1alpha1.StatefulSetList]
ns string
} }
// newStatefulSets returns a StatefulSets // newStatefulSets returns a StatefulSets
func newStatefulSets(c *AppsV1alpha1Client, namespace string) *statefulSets { func newStatefulSets(c *AppsV1alpha1Client, namespace string) *statefulSets {
return &statefulSets{ return &statefulSets{
client: c.RESTClient(), gentype.NewClientWithList[*appsv1alpha1.StatefulSet, *appsv1alpha1.StatefulSetList](
ns: namespace, "statefulsets",
c.RESTClient(),
scheme.ParameterCodec,
namespace,
func() *appsv1alpha1.StatefulSet { return &appsv1alpha1.StatefulSet{} },
func() *appsv1alpha1.StatefulSetList { return &appsv1alpha1.StatefulSetList{} },
),
} }
} }
// Get takes name of the statefulSet, and returns the corresponding statefulSet object, and an error if there is any.
func (c *statefulSets) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.StatefulSet, err error) {
result = &v1alpha1.StatefulSet{}
err = c.client.Get().
Namespace(c.ns).
Resource("statefulsets").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of StatefulSets that match those selectors.
func (c *statefulSets) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.StatefulSetList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1alpha1.StatefulSetList{}
err = c.client.Get().
Namespace(c.ns).
Resource("statefulsets").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested statefulSets.
func (c *statefulSets) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
Resource("statefulsets").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(ctx)
}
// Create takes the representation of a statefulSet and creates it. Returns the server's representation of the statefulSet, and an error, if there is any.
func (c *statefulSets) Create(ctx context.Context, statefulSet *v1alpha1.StatefulSet, opts v1.CreateOptions) (result *v1alpha1.StatefulSet, err error) {
result = &v1alpha1.StatefulSet{}
err = c.client.Post().
Namespace(c.ns).
Resource("statefulsets").
VersionedParams(&opts, scheme.ParameterCodec).
Body(statefulSet).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a statefulSet and updates it. Returns the server's representation of the statefulSet, and an error, if there is any.
func (c *statefulSets) Update(ctx context.Context, statefulSet *v1alpha1.StatefulSet, opts v1.UpdateOptions) (result *v1alpha1.StatefulSet, err error) {
result = &v1alpha1.StatefulSet{}
err = c.client.Put().
Namespace(c.ns).
Resource("statefulsets").
Name(statefulSet.Name).
VersionedParams(&opts, scheme.ParameterCodec).
Body(statefulSet).
Do(ctx).
Into(result)
return
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *statefulSets) UpdateStatus(ctx context.Context, statefulSet *v1alpha1.StatefulSet, opts v1.UpdateOptions) (result *v1alpha1.StatefulSet, err error) {
result = &v1alpha1.StatefulSet{}
err = c.client.Put().
Namespace(c.ns).
Resource("statefulsets").
Name(statefulSet.Name).
SubResource("status").
VersionedParams(&opts, scheme.ParameterCodec).
Body(statefulSet).
Do(ctx).
Into(result)
return
}
// Delete takes name of the statefulSet and deletes it. Returns an error if one occurs.
func (c *statefulSets) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("statefulsets").
Name(name).
Body(&opts).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *statefulSets) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
var timeout time.Duration
if listOpts.TimeoutSeconds != nil {
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Namespace(c.ns).
Resource("statefulsets").
VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout).
Body(&opts).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched statefulSet.
func (c *statefulSets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.StatefulSet, err error) {
result = &v1alpha1.StatefulSet{}
err = c.client.Patch(pt).
Namespace(c.ns).
Resource("statefulsets").
Name(name).
SubResource(subresources...).
VersionedParams(&opts, scheme.ParameterCodec).
Body(data).
Do(ctx).
Into(result)
return
}
// GetScale takes name of the statefulSet, and returns the corresponding autoscalingv1.Scale object, and an error if there is any. // GetScale takes name of the statefulSet, and returns the corresponding autoscalingv1.Scale object, and an error if there is any.
func (c *statefulSets) GetScale(ctx context.Context, statefulSetName string, options v1.GetOptions) (result *autoscalingv1.Scale, err error) { func (c *statefulSets) GetScale(ctx context.Context, statefulSetName string, options v1.GetOptions) (result *autoscalingv1.Scale, err error) {
result = &autoscalingv1.Scale{} result = &autoscalingv1.Scale{}
err = c.client.Get(). err = c.GetClient().Get().
Namespace(c.ns). Namespace(c.GetNamespace()).
Resource("statefulsets"). Resource("statefulsets").
Name(statefulSetName). Name(statefulSetName).
SubResource("scale"). SubResource("scale").
@ -214,8 +89,8 @@ func (c *statefulSets) GetScale(ctx context.Context, statefulSetName string, opt
// UpdateScale takes the top resource name and the representation of a scale and updates it. Returns the server's representation of the scale, and an error, if there is any. // UpdateScale takes the top resource name and the representation of a scale and updates it. Returns the server's representation of the scale, and an error, if there is any.
func (c *statefulSets) UpdateScale(ctx context.Context, statefulSetName string, scale *autoscalingv1.Scale, opts v1.UpdateOptions) (result *autoscalingv1.Scale, err error) { func (c *statefulSets) UpdateScale(ctx context.Context, statefulSetName string, scale *autoscalingv1.Scale, opts v1.UpdateOptions) (result *autoscalingv1.Scale, err error) {
result = &autoscalingv1.Scale{} result = &autoscalingv1.Scale{}
err = c.client.Put(). err = c.GetClient().Put().
Namespace(c.ns). Namespace(c.GetNamespace()).
Resource("statefulsets"). Resource("statefulsets").
Name(statefulSetName). Name(statefulSetName).
SubResource("scale"). SubResource("scale").

View File

@ -18,16 +18,15 @@ limitations under the License.
package v1alpha1 package v1alpha1
import ( import (
"context" context "context"
"time"
v1alpha1 "github.com/openkruise/kruise/apis/apps/v1alpha1" appsv1alpha1 "github.com/openkruise/kruise/apis/apps/v1alpha1"
scheme "github.com/openkruise/kruise/pkg/client/clientset/versioned/scheme" scheme "github.com/openkruise/kruise/pkg/client/clientset/versioned/scheme"
autoscalingv1 "k8s.io/api/autoscaling/v1" autoscalingv1 "k8s.io/api/autoscaling/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types" types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch" watch "k8s.io/apimachinery/pkg/watch"
rest "k8s.io/client-go/rest" gentype "k8s.io/client-go/gentype"
) )
// UnitedDeploymentsGetter has a method to return a UnitedDeploymentInterface. // UnitedDeploymentsGetter has a method to return a UnitedDeploymentInterface.
@ -38,15 +37,16 @@ type UnitedDeploymentsGetter interface {
// UnitedDeploymentInterface has methods to work with UnitedDeployment resources. // UnitedDeploymentInterface has methods to work with UnitedDeployment resources.
type UnitedDeploymentInterface interface { type UnitedDeploymentInterface interface {
Create(ctx context.Context, unitedDeployment *v1alpha1.UnitedDeployment, opts v1.CreateOptions) (*v1alpha1.UnitedDeployment, error) Create(ctx context.Context, unitedDeployment *appsv1alpha1.UnitedDeployment, opts v1.CreateOptions) (*appsv1alpha1.UnitedDeployment, error)
Update(ctx context.Context, unitedDeployment *v1alpha1.UnitedDeployment, opts v1.UpdateOptions) (*v1alpha1.UnitedDeployment, error) Update(ctx context.Context, unitedDeployment *appsv1alpha1.UnitedDeployment, opts v1.UpdateOptions) (*appsv1alpha1.UnitedDeployment, error)
UpdateStatus(ctx context.Context, unitedDeployment *v1alpha1.UnitedDeployment, opts v1.UpdateOptions) (*v1alpha1.UnitedDeployment, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
UpdateStatus(ctx context.Context, unitedDeployment *appsv1alpha1.UnitedDeployment, opts v1.UpdateOptions) (*appsv1alpha1.UnitedDeployment, error)
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.UnitedDeployment, error) Get(ctx context.Context, name string, opts v1.GetOptions) (*appsv1alpha1.UnitedDeployment, error)
List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.UnitedDeploymentList, error) List(ctx context.Context, opts v1.ListOptions) (*appsv1alpha1.UnitedDeploymentList, error)
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.UnitedDeployment, err error) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *appsv1alpha1.UnitedDeployment, err error)
GetScale(ctx context.Context, unitedDeploymentName string, options v1.GetOptions) (*autoscalingv1.Scale, error) GetScale(ctx context.Context, unitedDeploymentName string, options v1.GetOptions) (*autoscalingv1.Scale, error)
UpdateScale(ctx context.Context, unitedDeploymentName string, scale *autoscalingv1.Scale, opts v1.UpdateOptions) (*autoscalingv1.Scale, error) UpdateScale(ctx context.Context, unitedDeploymentName string, scale *autoscalingv1.Scale, opts v1.UpdateOptions) (*autoscalingv1.Scale, error)
@ -55,153 +55,28 @@ type UnitedDeploymentInterface interface {
// unitedDeployments implements UnitedDeploymentInterface // unitedDeployments implements UnitedDeploymentInterface
type unitedDeployments struct { type unitedDeployments struct {
client rest.Interface *gentype.ClientWithList[*appsv1alpha1.UnitedDeployment, *appsv1alpha1.UnitedDeploymentList]
ns string
} }
// newUnitedDeployments returns a UnitedDeployments // newUnitedDeployments returns a UnitedDeployments
func newUnitedDeployments(c *AppsV1alpha1Client, namespace string) *unitedDeployments { func newUnitedDeployments(c *AppsV1alpha1Client, namespace string) *unitedDeployments {
return &unitedDeployments{ return &unitedDeployments{
client: c.RESTClient(), gentype.NewClientWithList[*appsv1alpha1.UnitedDeployment, *appsv1alpha1.UnitedDeploymentList](
ns: namespace, "uniteddeployments",
c.RESTClient(),
scheme.ParameterCodec,
namespace,
func() *appsv1alpha1.UnitedDeployment { return &appsv1alpha1.UnitedDeployment{} },
func() *appsv1alpha1.UnitedDeploymentList { return &appsv1alpha1.UnitedDeploymentList{} },
),
} }
} }
// Get takes name of the unitedDeployment, and returns the corresponding unitedDeployment object, and an error if there is any.
func (c *unitedDeployments) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.UnitedDeployment, err error) {
result = &v1alpha1.UnitedDeployment{}
err = c.client.Get().
Namespace(c.ns).
Resource("uniteddeployments").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of UnitedDeployments that match those selectors.
func (c *unitedDeployments) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.UnitedDeploymentList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1alpha1.UnitedDeploymentList{}
err = c.client.Get().
Namespace(c.ns).
Resource("uniteddeployments").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested unitedDeployments.
func (c *unitedDeployments) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
Resource("uniteddeployments").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(ctx)
}
// Create takes the representation of a unitedDeployment and creates it. Returns the server's representation of the unitedDeployment, and an error, if there is any.
func (c *unitedDeployments) Create(ctx context.Context, unitedDeployment *v1alpha1.UnitedDeployment, opts v1.CreateOptions) (result *v1alpha1.UnitedDeployment, err error) {
result = &v1alpha1.UnitedDeployment{}
err = c.client.Post().
Namespace(c.ns).
Resource("uniteddeployments").
VersionedParams(&opts, scheme.ParameterCodec).
Body(unitedDeployment).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a unitedDeployment and updates it. Returns the server's representation of the unitedDeployment, and an error, if there is any.
func (c *unitedDeployments) Update(ctx context.Context, unitedDeployment *v1alpha1.UnitedDeployment, opts v1.UpdateOptions) (result *v1alpha1.UnitedDeployment, err error) {
result = &v1alpha1.UnitedDeployment{}
err = c.client.Put().
Namespace(c.ns).
Resource("uniteddeployments").
Name(unitedDeployment.Name).
VersionedParams(&opts, scheme.ParameterCodec).
Body(unitedDeployment).
Do(ctx).
Into(result)
return
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *unitedDeployments) UpdateStatus(ctx context.Context, unitedDeployment *v1alpha1.UnitedDeployment, opts v1.UpdateOptions) (result *v1alpha1.UnitedDeployment, err error) {
result = &v1alpha1.UnitedDeployment{}
err = c.client.Put().
Namespace(c.ns).
Resource("uniteddeployments").
Name(unitedDeployment.Name).
SubResource("status").
VersionedParams(&opts, scheme.ParameterCodec).
Body(unitedDeployment).
Do(ctx).
Into(result)
return
}
// Delete takes name of the unitedDeployment and deletes it. Returns an error if one occurs.
func (c *unitedDeployments) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("uniteddeployments").
Name(name).
Body(&opts).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *unitedDeployments) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
var timeout time.Duration
if listOpts.TimeoutSeconds != nil {
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Namespace(c.ns).
Resource("uniteddeployments").
VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout).
Body(&opts).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched unitedDeployment.
func (c *unitedDeployments) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.UnitedDeployment, err error) {
result = &v1alpha1.UnitedDeployment{}
err = c.client.Patch(pt).
Namespace(c.ns).
Resource("uniteddeployments").
Name(name).
SubResource(subresources...).
VersionedParams(&opts, scheme.ParameterCodec).
Body(data).
Do(ctx).
Into(result)
return
}
// GetScale takes name of the unitedDeployment, and returns the corresponding autoscalingv1.Scale object, and an error if there is any. // GetScale takes name of the unitedDeployment, and returns the corresponding autoscalingv1.Scale object, and an error if there is any.
func (c *unitedDeployments) GetScale(ctx context.Context, unitedDeploymentName string, options v1.GetOptions) (result *autoscalingv1.Scale, err error) { func (c *unitedDeployments) GetScale(ctx context.Context, unitedDeploymentName string, options v1.GetOptions) (result *autoscalingv1.Scale, err error) {
result = &autoscalingv1.Scale{} result = &autoscalingv1.Scale{}
err = c.client.Get(). err = c.GetClient().Get().
Namespace(c.ns). Namespace(c.GetNamespace()).
Resource("uniteddeployments"). Resource("uniteddeployments").
Name(unitedDeploymentName). Name(unitedDeploymentName).
SubResource("scale"). SubResource("scale").
@ -214,8 +89,8 @@ func (c *unitedDeployments) GetScale(ctx context.Context, unitedDeploymentName s
// UpdateScale takes the top resource name and the representation of a scale and updates it. Returns the server's representation of the scale, and an error, if there is any. // UpdateScale takes the top resource name and the representation of a scale and updates it. Returns the server's representation of the scale, and an error, if there is any.
func (c *unitedDeployments) UpdateScale(ctx context.Context, unitedDeploymentName string, scale *autoscalingv1.Scale, opts v1.UpdateOptions) (result *autoscalingv1.Scale, err error) { func (c *unitedDeployments) UpdateScale(ctx context.Context, unitedDeploymentName string, scale *autoscalingv1.Scale, opts v1.UpdateOptions) (result *autoscalingv1.Scale, err error) {
result = &autoscalingv1.Scale{} result = &autoscalingv1.Scale{}
err = c.client.Put(). err = c.GetClient().Put().
Namespace(c.ns). Namespace(c.GetNamespace()).
Resource("uniteddeployments"). Resource("uniteddeployments").
Name(unitedDeploymentName). Name(unitedDeploymentName).
SubResource("scale"). SubResource("scale").

View File

@ -18,15 +18,14 @@ limitations under the License.
package v1alpha1 package v1alpha1
import ( import (
"context" context "context"
"time"
v1alpha1 "github.com/openkruise/kruise/apis/apps/v1alpha1" appsv1alpha1 "github.com/openkruise/kruise/apis/apps/v1alpha1"
scheme "github.com/openkruise/kruise/pkg/client/clientset/versioned/scheme" scheme "github.com/openkruise/kruise/pkg/client/clientset/versioned/scheme"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types" types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch" watch "k8s.io/apimachinery/pkg/watch"
rest "k8s.io/client-go/rest" gentype "k8s.io/client-go/gentype"
) )
// WorkloadSpreadsGetter has a method to return a WorkloadSpreadInterface. // WorkloadSpreadsGetter has a method to return a WorkloadSpreadInterface.
@ -37,158 +36,34 @@ type WorkloadSpreadsGetter interface {
// WorkloadSpreadInterface has methods to work with WorkloadSpread resources. // WorkloadSpreadInterface has methods to work with WorkloadSpread resources.
type WorkloadSpreadInterface interface { type WorkloadSpreadInterface interface {
Create(ctx context.Context, workloadSpread *v1alpha1.WorkloadSpread, opts v1.CreateOptions) (*v1alpha1.WorkloadSpread, error) Create(ctx context.Context, workloadSpread *appsv1alpha1.WorkloadSpread, opts v1.CreateOptions) (*appsv1alpha1.WorkloadSpread, error)
Update(ctx context.Context, workloadSpread *v1alpha1.WorkloadSpread, opts v1.UpdateOptions) (*v1alpha1.WorkloadSpread, error) Update(ctx context.Context, workloadSpread *appsv1alpha1.WorkloadSpread, opts v1.UpdateOptions) (*appsv1alpha1.WorkloadSpread, error)
UpdateStatus(ctx context.Context, workloadSpread *v1alpha1.WorkloadSpread, opts v1.UpdateOptions) (*v1alpha1.WorkloadSpread, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
UpdateStatus(ctx context.Context, workloadSpread *appsv1alpha1.WorkloadSpread, opts v1.UpdateOptions) (*appsv1alpha1.WorkloadSpread, error)
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.WorkloadSpread, error) Get(ctx context.Context, name string, opts v1.GetOptions) (*appsv1alpha1.WorkloadSpread, error)
List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.WorkloadSpreadList, error) List(ctx context.Context, opts v1.ListOptions) (*appsv1alpha1.WorkloadSpreadList, error)
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.WorkloadSpread, err error) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *appsv1alpha1.WorkloadSpread, err error)
WorkloadSpreadExpansion WorkloadSpreadExpansion
} }
// workloadSpreads implements WorkloadSpreadInterface // workloadSpreads implements WorkloadSpreadInterface
type workloadSpreads struct { type workloadSpreads struct {
client rest.Interface *gentype.ClientWithList[*appsv1alpha1.WorkloadSpread, *appsv1alpha1.WorkloadSpreadList]
ns string
} }
// newWorkloadSpreads returns a WorkloadSpreads // newWorkloadSpreads returns a WorkloadSpreads
func newWorkloadSpreads(c *AppsV1alpha1Client, namespace string) *workloadSpreads { func newWorkloadSpreads(c *AppsV1alpha1Client, namespace string) *workloadSpreads {
return &workloadSpreads{ return &workloadSpreads{
client: c.RESTClient(), gentype.NewClientWithList[*appsv1alpha1.WorkloadSpread, *appsv1alpha1.WorkloadSpreadList](
ns: namespace, "workloadspreads",
c.RESTClient(),
scheme.ParameterCodec,
namespace,
func() *appsv1alpha1.WorkloadSpread { return &appsv1alpha1.WorkloadSpread{} },
func() *appsv1alpha1.WorkloadSpreadList { return &appsv1alpha1.WorkloadSpreadList{} },
),
} }
} }
// Get takes name of the workloadSpread, and returns the corresponding workloadSpread object, and an error if there is any.
func (c *workloadSpreads) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.WorkloadSpread, err error) {
result = &v1alpha1.WorkloadSpread{}
err = c.client.Get().
Namespace(c.ns).
Resource("workloadspreads").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of WorkloadSpreads that match those selectors.
func (c *workloadSpreads) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.WorkloadSpreadList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1alpha1.WorkloadSpreadList{}
err = c.client.Get().
Namespace(c.ns).
Resource("workloadspreads").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested workloadSpreads.
func (c *workloadSpreads) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
Resource("workloadspreads").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(ctx)
}
// Create takes the representation of a workloadSpread and creates it. Returns the server's representation of the workloadSpread, and an error, if there is any.
func (c *workloadSpreads) Create(ctx context.Context, workloadSpread *v1alpha1.WorkloadSpread, opts v1.CreateOptions) (result *v1alpha1.WorkloadSpread, err error) {
result = &v1alpha1.WorkloadSpread{}
err = c.client.Post().
Namespace(c.ns).
Resource("workloadspreads").
VersionedParams(&opts, scheme.ParameterCodec).
Body(workloadSpread).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a workloadSpread and updates it. Returns the server's representation of the workloadSpread, and an error, if there is any.
func (c *workloadSpreads) Update(ctx context.Context, workloadSpread *v1alpha1.WorkloadSpread, opts v1.UpdateOptions) (result *v1alpha1.WorkloadSpread, err error) {
result = &v1alpha1.WorkloadSpread{}
err = c.client.Put().
Namespace(c.ns).
Resource("workloadspreads").
Name(workloadSpread.Name).
VersionedParams(&opts, scheme.ParameterCodec).
Body(workloadSpread).
Do(ctx).
Into(result)
return
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
func (c *workloadSpreads) UpdateStatus(ctx context.Context, workloadSpread *v1alpha1.WorkloadSpread, opts v1.UpdateOptions) (result *v1alpha1.WorkloadSpread, err error) {
result = &v1alpha1.WorkloadSpread{}
err = c.client.Put().
Namespace(c.ns).
Resource("workloadspreads").
Name(workloadSpread.Name).
SubResource("status").
VersionedParams(&opts, scheme.ParameterCodec).
Body(workloadSpread).
Do(ctx).
Into(result)
return
}
// Delete takes name of the workloadSpread and deletes it. Returns an error if one occurs.
func (c *workloadSpreads) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("workloadspreads").
Name(name).
Body(&opts).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *workloadSpreads) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
var timeout time.Duration
if listOpts.TimeoutSeconds != nil {
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Namespace(c.ns).
Resource("workloadspreads").
VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout).
Body(&opts).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched workloadSpread.
func (c *workloadSpreads) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.WorkloadSpread, err error) {
result = &v1alpha1.WorkloadSpread{}
err = c.client.Patch(pt).
Namespace(c.ns).
Resource("workloadspreads").
Name(name).
SubResource(subresources...).
VersionedParams(&opts, scheme.ParameterCodec).
Body(data).
Do(ctx).
Into(result)
return
}

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