Compare commits

...

371 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
Abner-1 517b2537c5 bump features to beta in 1.8
Signed-off-by: Abner-1 <yuanyuxing.yyx@alibaba-inc.com>
2025-02-13 15:33:02 +08:00
Ai Ranthem 8f727a41a5
feature: range reserveOrdinals for AdvancedStatefulSet (#1873)
* feature: range reserveOrdinals for AdvancedStatefulSet

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

* feature: range reserveOrdinals for AdvancedStatefulSet

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

* feature: range reserveOrdinals for AdvancedStatefulSet

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

* feature: range reserveOrdinals for AdvancedStatefulSet

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

* feature: range reserveOrdinals for AdvancedStatefulSet

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

---------

Signed-off-by: AiRanthem <zhongtianyun.zty@alibaba-inc.com>
2025-02-12 16:07:23 +08:00
Abner 4183fbc48a
delete test context DeleteNamespaceOnFailure (#1908)
Signed-off-by: Abner-1 <yuanyuxing.yyx@alibaba-inc.com>
2025-02-11 20:42:07 +08:00
dependabot[bot] 2a292857f7 Bump codecov/codecov-action from 4.6.0 to 5.3.1
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 4.6.0 to 5.3.1.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](b9fd7d16f6...13ce06bfc6)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-10 14:15:48 +08:00
dependabot[bot] 71ad0968f8 Bump crate-ci/typos from 1.28.1 to 1.29.5
Bumps [crate-ci/typos](https://github.com/crate-ci/typos) from 1.28.1 to 1.29.5.
- [Release notes](https://github.com/crate-ci/typos/releases)
- [Changelog](https://github.com/crate-ci/typos/blob/master/CHANGELOG.md)
- [Commits](bd36f89fcd...11ca4583f2)

---
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-02-10 13:34:51 +08:00
Zhen Zhang 7124cb8034
configure codecov to ignore client package (#1910)
Signed-off-by: 守辰 <shouchen.zz@alibaba-inc.com>
2025-02-10 13:02:40 +08:00
Zhen Zhang 2beb9d0357
fix typo and dependency problem (#1907)
Signed-off-by: 守辰 <shouchen.zz@alibaba-inc.com>
2025-02-10 09:48:11 +08:00
Abner-1 58fd993374 enable sidecarset e2e parallelism feature
Signed-off-by: Abner-1 <yuanyuxing.yyx@alibaba-inc.com>
2025-02-07 19:45:31 +08:00
Abner-1 35c94ed3ce upgrade k8s deps 1.30
Signed-off-by: Abner-1 <yuanyuxing.yyx@alibaba-inc.com>
2025-02-07 19:45:31 +08:00
dependabot[bot] 4940a61720
Bump actions/upload-artifact from 4.3.6 to 4.6.0 (#1889)
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4.3.6 to 4.6.0.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](834a144ee9...65c4c4a1dd)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  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-02-07 17:40:29 +08:00
dependabot[bot] 598955d825
Bump helm/kind-action from 1.10.0 to 1.12.0 (#1886)
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...v1.12.0)

---
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>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-07 15:44:44 +08:00
dependabot[bot] f2189e1eeb
Bump github/codeql-action from 3.28.1 to 3.28.8 (#1902)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.28.1 to 3.28.8.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](b6a472f63d...dd746615b3)

---
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>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-07 10:55:15 +08:00
berg 3f5dd59dfd
podprobemarker support serverless pod (#1875)
Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>
2025-02-07 09:35:26 +08:00
FlikweertvisionVadym 3fccad945f
Fix: issue cri-dockerd runtime not being found (#1899)
* Fix: issue cri-dockerd runtime not being found

Signed-off-by: Vadym Tartakovskyi <tvadost2003@gmail.com>
2025-01-30 09:26:57 +08:00
AiRanthem c393385ef1 Fix test flakiness in TestWorkloadSpreadMutatingPod by removing dependency on time.Now
Signed-off-by: AiRanthem <zhongtianyun.zty@alibaba-inc.com>
2025-01-21 16:30:45 +08:00
dependabot[bot] 08a7565fca Bump ruby/setup-ruby from 1.202.0 to 1.213.0
Bumps [ruby/setup-ruby](https://github.com/ruby/setup-ruby) from 1.202.0 to 1.213.0.
- [Release notes](https://github.com/ruby/setup-ruby/releases)
- [Changelog](https://github.com/ruby/setup-ruby/blob/master/release.rb)
- [Commits](a2bbe5b1b2...28c4deda89)

---
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-01-20 19:03:25 +08:00
dependabot[bot] 531d6501d2 Bump github/codeql-action from 3.27.6 to 3.28.1
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.27.6 to 3.28.1.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](aa57810251...b6a472f63d)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-20 19:01:54 +08:00
AiRanthem cd23dc1038 Bugfix: WorkloadSpread cannot patch priorityClassName
Signed-off-by: AiRanthem <zhongtianyun.zty@alibaba-inc.com>
2025-01-10 14:02:07 +08:00
liheng.zms 58c1ecb5c6 Fix: ImagePullJob timeout setting is not effective when it is greater than 1800
Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>
2025-01-07 19:03:57 +08:00
liheng.zms 79b64c14e2 bugfix: pub webhook no longer requires pod ownerRef to exist
Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>
2025-01-03 09:42:35 +08:00
Zhen Zhang 42f5266bfa
remove docker dependency (#1870)
Signed-off-by: 守辰 <shouchen.zz@alibaba-inc.com>
2025-01-02 20:36:24 +08:00
Zhen Zhang e3e6d471a7
always use cri to pull images (#1867)
Signed-off-by: 守辰 <shouchen.zz@alibaba-inc.com>
Signed-off-by: furykerry <furykerry@gmail.com>
2024-12-30 14:31:40 +08:00
Ai Ranthem 0f3b58ae7d
Job-like workload supported by WorkloadSpread (#1838)
* A TargetFilter is added to WorkloadSpread to make it possible to manage only a part of Pods owned by a target workload to support AI workloads like TFJob. And it also provides support for workloads without replicas.

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

* fix some logs

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

---------

Signed-off-by: AiRanthem <zhongtianyun.zty@alibaba-inc.com>
2024-12-27 14:10:55 +08:00
Ai Ranthem 2cdb7600f1
Feature: SidecarSet injection supports Partial strategy (#1856)
* SidecarSet injection supports TODO strategy

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

* passing test

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

* rename the policy

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

* Partition and Selector cannot be used together

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

* Partition and Selector cannot be used together

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

---------

Signed-off-by: AiRanthem <zhongtianyun.zty@alibaba-inc.com>
2024-12-25 18:29:51 +08:00
Abner-1 aeb7f19f82 add ut test case for asts lifecycle
Signed-off-by: Abner-1 <yuanyuxing.yyx@alibaba-inc.com>
2024-12-25 14:23:36 +08:00
mingzhou.swx b9da21ab56 add pre-normal hook for asts
Signed-off-by: mingzhou.swx <mingzhou.swx@alibaba-inc.com>
2024-12-25 14:23:36 +08:00
Abner-1 d25416f63e add change qos validator and recreate pod when qos changed
Signed-off-by: Abner-1 <yuanyuxing.yyx@alibaba-inc.com>
2024-12-23 17:06:12 +08:00
摸鱼喵 6968bd8972
feat: enhanced in-place update module to support vertical scaling (#1353)
* feat: enhanced in-place update module to support vertical scaling

Signed-off-by: LavenderQAQ <lavenderqaq.cs@gmail.com>

* test: fixed pre-delete hook tests for advance daemonset

Signed-off-by: LavenderQAQ <lavenderqaq.cs@gmail.com>

* refactor: define vertically updated interfaces for different implementations

Signed-off-by: LavenderQAQ <lavenderqaq.cs@gmail.com>

* feat: remove offstream when vertical update only

Signed-off-by: LavenderQAQ <lavenderqaq.cs@gmail.com>

* 1. merge into default handler and add uts/e2e
2. add failed case in e2e test and change following comments
3. remove last resource in spec annotation
4. remove container level inplace-vertical-scaling api in interface

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

---------

Signed-off-by: LavenderQAQ <lavenderqaq.cs@gmail.com>
Signed-off-by: Abner-1 <yuanyuxing.yyx@alibaba-inc.com>
Co-authored-by: Abner-1 <yuanyuxing.yyx@alibaba-inc.com>
2024-12-19 20:36:32 +08:00
liheng.zms 5ac38335e5 1.7.3, changelog
Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>
2024-12-18 14:11:58 +08:00
liheng.zms a74b22efed fix PyTorchJob create pod failure due to pod webhook
Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>
2024-12-18 12:01:00 +08:00
dependabot[bot] b800c5dee8 Bump actions/setup-go from 5.0.2 to 5.2.0
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 5.0.2 to 5.2.0.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](0a12ed9d6a...3041bf56c9)

---
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>
2024-12-17 13:09:51 +08:00
dependabot[bot] 158325671c Bump actions/cache from 4.1.0 to 4.2.0
Bumps [actions/cache](https://github.com/actions/cache) from 4.1.0 to 4.2.0.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](2cdf405574...1bd1e32a3b)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-12-10 09:45:14 +08:00
dependabot[bot] 4f93af8f06 Bump github/codeql-action from 3.27.4 to 3.27.6
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.27.4 to 3.27.6.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](ea9e4e3799...aa57810251)

---
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>
2024-12-10 09:44:11 +08:00
Ai Ranthem 0ee354453c
update makefile and remove helm hook ci workflow (#1847)
Signed-off-by: AiRanthem <zhongtianyun.zty@alibaba-inc.com>
2024-12-06 16:01:12 +08:00
Ai Ranthem 22c81a8f1b
add helm pre delete hook (#1843)
* add helm pre delete hook

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

* add docker-image CI and makefile command for helm hook

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

---------

Signed-off-by: AiRanthem <zhongtianyun.zty@alibaba-inc.com>
2024-12-06 11:49:25 +08:00
dependabot[bot] 1b40f5bde8 Bump crate-ci/typos from 1.27.3 to 1.28.1
Bumps [crate-ci/typos](https://github.com/crate-ci/typos) from 1.27.3 to 1.28.1.
- [Release notes](https://github.com/crate-ci/typos/releases)
- [Changelog](https://github.com/crate-ci/typos/blob/master/CHANGELOG.md)
- [Commits](b74202f74b...bd36f89fcd)

---
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>
2024-12-03 09:36:00 +08:00
berg 4661b6e02c
fix: a smaller maxUnavaila will block the sidecarSet from updating pods (#1834)
Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>
2024-11-21 13:12:54 +08:00
dependabot[bot] 54a769f654 Bump github/codeql-action from 3.27.1 to 3.27.4
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.27.1 to 3.27.4.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](4f3212b617...ea9e4e3799)

---
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>
2024-11-19 17:59:38 +08:00
liheng.zms 3e225bbca0 fix imagepulljob imagePullPolicy=Always does not take effect
Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>
2024-11-19 17:57:48 +08:00
liheng.zms 26a07e26f6 fix cloneSet controller block caused by scale expectation leakage
Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>
2024-11-19 17:55:54 +08:00
dependabot[bot] fa139cb034 Bump actions/checkout from 4.2.0 to 4.2.2
Bumps [actions/checkout](https://github.com/actions/checkout) from 4.2.0 to 4.2.2.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](d632683dd7...11bd71901b)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-18 16:38:36 +08:00
dependabot[bot] eb78da4354 Bump crate-ci/typos from 1.24.1 to 1.27.3
Bumps [crate-ci/typos](https://github.com/crate-ci/typos) from 1.24.1 to 1.27.3.
- [Release notes](https://github.com/crate-ci/typos/releases)
- [Changelog](https://github.com/crate-ci/typos/blob/master/CHANGELOG.md)
- [Commits](b86466d268...b74202f74b)

---
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>
2024-11-18 11:08:40 +08:00
dependabot[bot] b157f4182c Bump aquasecurity/trivy-action
Bumps [aquasecurity/trivy-action](https://github.com/aquasecurity/trivy-action) from fc1500abdcdc9fc681e98d8912a52fa70dbc67de to d2a392a13760cb64cb6bbd31d4bed2a7d9a5298d.
- [Release notes](https://github.com/aquasecurity/trivy-action/releases)
- [Commits](fc1500abdc...d2a392a137)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-18 10:20:04 +08:00
dependabot[bot] 924c5ee0af Bump github/codeql-action from 3.26.12 to 3.27.1
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.26.12 to 3.27.1.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](c36620d31a...4f3212b617)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-18 10:04:43 +08:00
Zhen Zhang 5ce62c948a
fix docs and test typo (#1824)
Signed-off-by: 守辰 <shouchen.zz@alibaba-inc.com>
2024-11-13 09:36:39 +08:00
dependabot[bot] 9924a6238b Bump ruby/setup-ruby from 1.197.0 to 1.202.0
Bumps [ruby/setup-ruby](https://github.com/ruby/setup-ruby) from 1.197.0 to 1.202.0.
- [Release notes](https://github.com/ruby/setup-ruby/releases)
- [Changelog](https://github.com/ruby/setup-ruby/blob/master/release.rb)
- [Commits](7bae1d00b5...a2bbe5b1b2)

---
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>
2024-11-12 09:28:43 +08:00
Abner 1880364f4b
define partition as number of non-updated pods should be reversed (#1819)
Signed-off-by: Abner-1 <yuanyuxing.yyx@alibaba-inc.com>
2024-11-11 11:50:17 +08:00
Ai Ranthem c426ed9b1e
an error will be returned by workloadspread webhook when `getObjectOf` pod's owner failed; prevent WorkloadSpread e2e panic (#1807)
Signed-off-by: AiRanthem <zhongtianyun.zty@alibaba-inc.com>
2024-10-31 14:35:27 +08:00
Kürşat Aktaş 558765e18f Introducing Kruise Guru on Gurubase.io
Signed-off-by: Kürşat Aktaş <kursat.ce@gmail.com>
2024-10-30 10:51:11 +08:00
dependabot[bot] cba1c8a3ac Bump aquasecurity/trivy-action
Bumps [aquasecurity/trivy-action](https://github.com/aquasecurity/trivy-action) from d9cd5b1c23aaf8cb31bb09141028215828364bbb to fc1500abdcdc9fc681e98d8912a52fa70dbc67de.
- [Release notes](https://github.com/aquasecurity/trivy-action/releases)
- [Commits](d9cd5b1c23...fc1500abdc)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-24 12:54:33 +08:00
Ai Ranthem 77bacae8e6
sync all fields in ud spec to subset workload spec and fix adapter revision label bug (#1798)
Signed-off-by: AiRanthem <zhongtianyun.zty@alibaba-inc.com>
Co-authored-by: AiRanthem <zhongtianyun.zty@alibaba-inc.com>
2024-10-23 16:25:36 +08:00
dependabot[bot] 2386e8115a Bump ruby/setup-ruby from 1.196.0 to 1.197.0
Bumps [ruby/setup-ruby](https://github.com/ruby/setup-ruby) from 1.196.0 to 1.197.0.
- [Release notes](https://github.com/ruby/setup-ruby/releases)
- [Changelog](https://github.com/ruby/setup-ruby/blob/master/release.rb)
- [Commits](f269373437...7bae1d00b5)

---
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>
2024-10-21 17:50:57 +08:00
dependabot[bot] 5a5768204c Bump github/codeql-action from 3.26.11 to 3.26.12
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.26.11 to 3.26.12.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](6db8d6351f...c36620d31a)

---
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>
2024-10-15 10:39:42 +08:00
Ai Ranthem 29f2323d59
Adaptive scheduling strategy for UnitedDeployment and refactor subset adapter (#1720)
Signed-off-by: AiRanthem <zhongtianyun.zty@alibaba-inc.com>
Co-authored-by: AiRanthem <zhongtianyun.zty@alibaba-inc.com>
2024-10-15 10:38:01 +08:00
zybtakeit 0964df6da6
adjust the judgment logic of whether the current ordinal needs to be updated (#1751)
* adjust the judgment logic of whether the current ordinal needs to be updated

Signed-off-by: zhangyubin <zhangyubin@zhangyubindeMacBook-Pro.local>

* add more ut cases and description about isCurrentRevisionNeeded(create pod with current revision or updated)

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

---------

Signed-off-by: zhangyubin <zhangyubin@zhangyubindeMacBook-Pro.local>
Signed-off-by: Abner-1 <yuanyuxing.yyx@alibaba-inc.com>
Co-authored-by: zhangyubin <zhangyubin@zhangyubindeMacBook-Pro.local>
Co-authored-by: Abner-1 <yuanyuxing.yyx@alibaba-inc.com>
2024-10-12 17:58:51 +08:00
Abner-1 c5f751af5e add changelog about 1.5.5, 1.6.4 and 1.7.2
Signed-off-by: Abner-1 <yuanyuxing.yyx@alibaba-inc.com>
2024-10-10 20:30:39 +08:00
AiRanthem de5c362b51 make ut more robust
Signed-off-by: AiRanthem <zhongtianyun.zty@alibaba-inc.com>
2024-10-10 17:59:42 +08:00
dependabot[bot] f6a8ad7a03 Bump codecov/codecov-action from 4.5.0 to 4.6.0
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 4.5.0 to 4.6.0.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](e28ff129e5...b9fd7d16f6)

---
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>
2024-10-09 17:42:47 +08:00
AiRanthem 7217ba0c3e add time cost fix for a ut
Signed-off-by: AiRanthem <zhongtianyun.zty@alibaba-inc.com>
2024-10-09 15:53:13 +08:00
dependabot[bot] 91f7a75ab3 Bump ruby/setup-ruby from 1.193.0 to 1.196.0
Bumps [ruby/setup-ruby](https://github.com/ruby/setup-ruby) from 1.193.0 to 1.196.0.
- [Release notes](https://github.com/ruby/setup-ruby/releases)
- [Changelog](https://github.com/ruby/setup-ruby/blob/master/release.rb)
- [Commits](f321cf5a4d...f269373437)

---
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>
2024-10-08 17:20:26 +08:00
hantmac bd746c882d fix: override namespace config after deploying
Signed-off-by: hantmac <hantmac@outlook.com>
2024-10-08 15:10:17 +08:00
dependabot[bot] 9e7188fbf0 Bump golangci/golangci-lint-action from 6.1.0 to 6.1.1
Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 6.1.0 to 6.1.1.
- [Release notes](https://github.com/golangci/golangci-lint-action/releases)
- [Commits](aaa42aa062...971e284b60)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-08 09:41:42 +08:00
dependabot[bot] 123b3b0071 Bump github/codeql-action from 3.26.8 to 3.26.11
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.26.8 to 3.26.11.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](294a9d9291...6db8d6351f)

---
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>
2024-10-08 09:28:42 +08:00
dependabot[bot] ae744be345 Bump actions/checkout from 4.1.5 to 4.2.0
Bumps [actions/checkout](https://github.com/actions/checkout) from 4.1.5 to 4.2.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4.1.5...d632683dd7b4114ad314bca15554477dd762a938)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-08 09:26:05 +08:00
dependabot[bot] 4cec4598ac Bump actions/cache from 4.0.2 to 4.1.0
Bumps [actions/cache](https://github.com/actions/cache) from 4.0.2 to 4.1.0.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](0c45773b62...2cdf405574)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-08 09:24:46 +08:00
dependabot[bot] fcc9c1b967 Bump golang.org/x/sys in /tools/src/kind
Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.0.0-20210630005230-0f9fa26af87c to 0.1.0.
- [Commits](https://github.com/golang/sys/commits/v0.1.0)

---
updated-dependencies:
- dependency-name: golang.org/x/sys
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-26 13:33:52 +08:00
liheng.zms d79f404e1f support pub pub.kruise.io/disable-fetch-replicas-from-workload=true
Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>
2024-09-25 19:02:21 +08:00
Abner-1 450dc5e0d7 support resizing pvc only
Signed-off-by: Abner-1 <yuanyuxing.yyx@alibaba-inc.com>
2024-09-25 16:22:45 +08:00
Ai Ranthem 4f04e93f48
patches volume claim templates into pods before ValidatePodSpec in workloadspread patch validation (#1740)
Signed-off-by: AiRanthem <zhongtianyun.zty@alibaba-inc.com>
Co-authored-by: AiRanthem <zhongtianyun.zty@alibaba-inc.com>
2024-09-24 11:21:59 +08:00
dependabot[bot] 198461e056 Bump ruby/setup-ruby from 1.190.0 to 1.193.0
Bumps [ruby/setup-ruby](https://github.com/ruby/setup-ruby) from 1.190.0 to 1.193.0.
- [Release notes](https://github.com/ruby/setup-ruby/releases)
- [Changelog](https://github.com/ruby/setup-ruby/blob/master/release.rb)
- [Commits](a6e6f86333...f321cf5a4d)

---
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>
2024-09-23 19:16:03 +08:00
dependabot[bot] 993afa3549 Bump github/codeql-action from 3.26.5 to 3.26.8
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.26.5 to 3.26.8.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](2c779ab0d0...294a9d9291)

---
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>
2024-09-23 19:07:32 +08:00
Abner 81eb820ad9
add ci action (#1752)
Signed-off-by: Abner-1 <yuanyuxing.yyx@alibaba-inc.com>
2024-09-19 15:29:30 +08:00
Abner 6d57029cd4
support specified-delete in asts (#1734)
Signed-off-by: Abner-1 <yuanyuxing.yyx@alibaba-inc.com>
2024-09-18 15:34:14 +08:00
Zhen Zhang 7dcdf8d951
Fix codeql and dependency problem (#1748)
* fix codeql warning

Signed-off-by: 守辰 <shouchen.zz@alibaba-inc.com>

* pin and fix dependency problem

Signed-off-by: 守辰 <shouchen.zz@alibaba-inc.com>

---------

Signed-off-by: 守辰 <shouchen.zz@alibaba-inc.com>
2024-09-18 09:43:44 +08:00
michaelrren f32166c08a fix(test): resolve race condition while running tests
Signed-off-by: michaelrren <m.renhaoshi@gmail.com>
2024-09-13 14:46:58 +08:00
Ai Ranthem 2d992bfd99
On pod creation, if a new pod matches the SidecarSet update strategy selector, the latest revision rather than that specified in the sidecarset.spec.injectionStrategy will be injected. (#1689)
Signed-off-by: AiRanthem <zhongtianyun.zty@alibaba-inc.com>
Co-authored-by: AiRanthem <zhongtianyun.zty@alibaba-inc.com>
2024-09-10 16:10:01 +08:00
berg be1a79e260
1.7.1 changelog (#1727)
Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>
2024-09-05 13:06:00 +08:00
Abner 179d759cf7
fix kind install bug (#1688)
Signed-off-by: Abner-1 <yuanyuxing.yyx@alibaba-inc.com>
2024-09-05 10:31:00 +08:00
berg 4918768828
fix sidecarset e2e (#1724)
Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>
2024-09-03 15:30:59 +08:00
berg 68a3793185
remove normal initcontainer in sidecarset's sidecar list (#1719)
Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>
2024-08-30 17:28:54 +08:00
berg a6355b8279
when update cabundle reduce the invalid updated (#1717)
* when update cabundle reduce the invalid updated

Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>

* bump controller-runtime to v0.16.6

Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>

---------

Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>
2024-08-30 14:09:54 +08:00
Prepmachine4 d25f72f9f4
feat: BroadcastJob Controller list pods add the disableDeepCopy options (#1593) (#1696)
Signed-off-by: Prepmachine4 <prepmachine4@gmail.com>
2024-08-28 13:27:53 +08:00
berg 8f4095a73c
fix go.mod k8s.io/* from v0.30.0 to v0.28.9 (#1716)
Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>
2024-08-28 13:16:53 +08:00
Abner-1 9e58975d9c add proposal about resize asts pvc
Signed-off-by: Abner-1 <yuanyuxing.yyx@alibaba-inc.com>
2024-08-27 20:21:22 +08:00
Abner-1 c66ed5cf2d update PVC regardless of whether the Pod is terminating
Signed-off-by: Abner-1 <yuanyuxing.yyx@alibaba-inc.com>
2024-08-27 20:18:31 +08:00
Abner-1 0ff70fb678 add csi-driver-host-path in e2e kind cluster
Signed-off-by: Abner-1 <yuanyuxing.yyx@alibaba-inc.com>
2024-08-27 20:18:31 +08:00
Abner-1 5affbed5d1 support sts vct resize
Signed-off-by: Abner-1 <yuanyuxing.yyx@alibaba-inc.com>
2024-08-27 20:18:31 +08:00
dependabot[bot] 3cb1e59b1c Bump crate-ci/typos from 1.23.5 to 1.24.1
Bumps [crate-ci/typos](https://github.com/crate-ci/typos) from 1.23.5 to 1.24.1.
- [Release notes](https://github.com/crate-ci/typos/releases)
- [Changelog](https://github.com/crate-ci/typos/blob/master/CHANGELOG.md)
- [Commits](c7af4712ed...b86466d268)

---
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>
2024-08-27 15:34:33 +08:00
dependabot[bot] f5508c5f90 Bump github/codeql-action from 3.26.0 to 3.26.5
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.26.0 to 3.26.5.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/v3.26.0...2c779ab0d087cd7fe7b826087247c2c81f27bfa6)

---
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>
2024-08-26 20:24:26 +08:00
Harshita Sao 11fdf8fa11
fix: fixed the token-permission and pinned dependencies issue (#1707)
Signed-off-by: harshitasao <harshitasao@gmail.com>
2024-08-19 10:34:45 +08:00
berg ab4c6d0715
kruise support json log (#1703)
Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>
2024-08-19 10:10:44 +08:00
dependabot[bot] dc3d8db14a
Bump actions/upload-artifact from 4.3.4 to 4.3.6 (#1702)
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4.3.4 to 4.3.6.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](0b2256b8c0...834a144ee9)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  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>
2024-08-13 15:24:39 +08:00
dependabot[bot] 2cd20da96b
Bump golangci/golangci-lint-action from 6.0.1 to 6.1.0 (#1690)
Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 6.0.1 to 6.1.0.
- [Release notes](https://github.com/golangci/golangci-lint-action/releases)
- [Commits](https://github.com/golangci/golangci-lint-action/compare/v6.0.1...v6.1.0)

---
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>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-13 14:29:39 +08:00
dependabot[bot] c7ffa18d75
Bump github/codeql-action from 3.25.15 to 3.26.0 (#1701)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.25.15 to 3.26.0.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Commits](https://github.com/github/codeql-action/compare/v3.25.15...v3.26.0)

---
updated-dependencies:
- dependency-name: github/codeql-action
  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>
2024-08-13 14:22:39 +08:00
dependabot[bot] 5a52530c7f
Bump github.com/docker/docker (#1700)
Bumps [github.com/docker/docker](https://github.com/docker/docker) from 26.1.4+incompatible to 26.1.5+incompatible.
- [Release notes](https://github.com/docker/docker/releases)
- [Commits](https://github.com/docker/docker/compare/v26.1.4...v26.1.5)

---
updated-dependencies:
- dependency-name: github.com/docker/docker
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-12 11:47:38 +08:00
berg 5a862a3313
release 1.7.0 changelog (#1684)
Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>
2024-08-05 21:11:32 +08:00
dependabot[bot] 5fac1ff469
Bump github/codeql-action from 2.25.0 to 3.25.15 (#1693)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.25.0 to 3.25.15.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Commits](https://github.com/github/codeql-action/compare/v2.25.0...v3.25.15)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-05 19:03:32 +08:00
dependabot[bot] 64cf2ec764
Bump github.com/docker/docker (#1685)
Bumps [github.com/docker/docker](https://github.com/docker/docker) from 26.0.2+incompatible to 26.1.4+incompatible.
- [Release notes](https://github.com/docker/docker/releases)
- [Commits](https://github.com/docker/docker/compare/v26.0.2...v26.1.4)

---
updated-dependencies:
- dependency-name: github.com/docker/docker
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-02 15:57:29 +08:00
Kuromesi ee572bfff0
read certs from secrets to support external certs (#1677)
Signed-off-by: Kuromesi <blackfacepan@163.com>
2024-08-01 12:09:28 +08:00
dependabot[bot] b19c4d88f7
Bump crate-ci/typos from 1.23.1 to 1.23.5 (#1676)
Bumps [crate-ci/typos](https://github.com/crate-ci/typos) from 1.23.1 to 1.23.5.
- [Release notes](https://github.com/crate-ci/typos/releases)
- [Changelog](https://github.com/crate-ci/typos/blob/master/CHANGELOG.md)
- [Commits](https://github.com/crate-ci/typos/compare/v1.23.1...v1.23.5)

---
updated-dependencies:
- dependency-name: crate-ci/typos
  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>
2024-07-31 16:41:28 +08:00
JieWu 61ee5bc727
Fix nil panic in cloneset validating webhook (#1678)
Signed-off-by: Spground <pingshan.wj@alibaba-inc.com>
Co-authored-by: Spground <pingshan.wj@alibaba-inc.com>
2024-07-31 15:05:27 +08:00
Ai Ranthem 11e5ac091f
support structured logging (#1669)
Signed-off-by: AiRanthem <zhongtianyun.zty@alibaba-inc.com>
Co-authored-by: AiRanthem <zhongtianyun.zty@alibaba-inc.com>
2024-07-30 16:57:26 +08:00
dependabot[bot] a9f617f4c5
Bump ossf/scorecard-action from 2.3.3 to 2.4.0 (#1675)
Bumps [ossf/scorecard-action](https://github.com/ossf/scorecard-action) from 2.3.3 to 2.4.0.
- [Release notes](https://github.com/ossf/scorecard-action/releases)
- [Changelog](https://github.com/ossf/scorecard-action/blob/main/RELEASE.md)
- [Commits](dc50aa9510...62b2cac7ed)

---
updated-dependencies:
- dependency-name: ossf/scorecard-action
  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>
2024-07-30 12:48:26 +08:00
Se7en 71c6e7a54c
feat: add pod index label (#1667)
Signed-off-by: Se7en <chengzw258@163.com>
2024-07-23 13:50:20 +08:00
Jeremy c5c6df7176
add proposal for support progressDeadlineSeconds in CloneSet (#1520)
more docs



fix mdl ci



complete the proposal



fix



update



fix typo



Bump crate-ci/typos from 1.22.9 to 1.23.1 (#1658)

Bumps [crate-ci/typos](https://github.com/crate-ci/typos) from 1.22.9 to 1.23.1.
- [Release notes](https://github.com/crate-ci/typos/releases)
- [Changelog](https://github.com/crate-ci/typos/blob/master/CHANGELOG.md)
- [Commits](https://github.com/crate-ci/typos/compare/v1.22.9...v1.23.1)

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




Bump actions/upload-artifact from 4.3.3 to 4.3.4 (#1659)

Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4.3.3 to 4.3.4.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](65462800fd...0b2256b8c0)

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




changed the scorecard badge link to the standard format and updated the domain (#1657)



fix typo

Signed-off-by: hantmac <hantmac@outlook.com>
2024-07-22 10:13:19 +08:00
Kuromesi 9b1a88d0f0
add support for external certs (#1665)
Signed-off-by: Kuromesi <blackfacepan@163.com>
2024-07-22 10:11:19 +08:00
Harshita Sao 2d3e0be187
changed the scorecard badge link to the standard format and updated the domain (#1657)
Signed-off-by: harshitasao <harshitasao@gmail.com>
2024-07-15 10:07:13 +08:00
dependabot[bot] bfb70a147f
Bump actions/upload-artifact from 4.3.3 to 4.3.4 (#1659)
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4.3.3 to 4.3.4.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](65462800fd...0b2256b8c0)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  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>
2024-07-09 17:54:07 +08:00
dependabot[bot] 2e9024a354
Bump crate-ci/typos from 1.22.9 to 1.23.1 (#1658)
Bumps [crate-ci/typos](https://github.com/crate-ci/typos) from 1.22.9 to 1.23.1.
- [Release notes](https://github.com/crate-ci/typos/releases)
- [Changelog](https://github.com/crate-ci/typos/blob/master/CHANGELOG.md)
- [Commits](https://github.com/crate-ci/typos/compare/v1.22.9...v1.23.1)

---
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>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-09 17:53:09 +08:00
dependabot[bot] 8ae13b1b81
Bump crate-ci/typos from 1.21.0 to 1.22.9 (#1650)
Bumps [crate-ci/typos](https://github.com/crate-ci/typos) from 1.21.0 to 1.22.9.
- [Release notes](https://github.com/crate-ci/typos/releases)
- [Changelog](https://github.com/crate-ci/typos/blob/master/CHANGELOG.md)
- [Commits](https://github.com/crate-ci/typos/compare/v1.21.0...v1.22.9)

---
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>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-24 19:17:53 +08:00
jairui f0f6eef44d
support structured logging for pkg/controller (#1629)
Signed-off-by: jairui <jairuigou@gmail.com>
2024-06-24 14:01:53 +08:00
Abner 0f6aada9d3
opt sts updateStatefulSet (#1648)
Signed-off-by: Abner-1 <yuanyuxing.yyx@alibaba-inc.com>
2024-06-18 20:09:48 +08:00
berg 837b67192d
add generate helm crds scripts (#1525)
Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>
2024-06-18 09:40:47 +08:00
Abner bbb2d2695a
add start ordinal and e2e case (#1643)
Signed-off-by: Abner-1 <yuanyuxing.yyx@alibaba-inc.com>
2024-06-17 17:55:47 +08:00
dependabot[bot] 9e253c5af6
Bump helm/kind-action from 1.9.0 to 1.10.0 (#1618)
Bumps [helm/kind-action](https://github.com/helm/kind-action) from 1.9.0 to 1.10.0.
- [Release notes](https://github.com/helm/kind-action/releases)
- [Commits](https://github.com/helm/kind-action/compare/v1.9.0...v1.10.0)

---
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>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-17 17:47:47 +08:00
chengjoey 0313790124
support `cri-dockerd.sock` for docker runtime (#1634)
Signed-off-by: joey <zchengjoey@gmail.com>
2024-06-12 11:25:43 +08:00
JieWu 8e2f8f551a
Fix sidecarset inconsistentStatus always True bug when restart, close #1636 (#1641)
Signed-off-by: Spground <pingshan.wj@alibaba-inc.com>
Co-authored-by: Spground <pingshan.wj@alibaba-inc.com>
2024-06-12 11:23:43 +08:00
Kuromesi 5ea03f19be
add support for credential provider plugin (#1383)
Signed-off-by: Kuromesi <blackfacepan@163.com>
2024-06-11 09:39:42 +08:00
Abner 145a9af1df
fix ut error in some machines without docker auth info (#1640)
Signed-off-by: Abner-1 <yuanyuxing.yyx@alibaba-inc.com>
2024-06-05 12:10:36 +08:00
Abner eb9a8b6d81
add ephemeraljob validating webhook, add validation&ut (#1615)
Signed-off-by: Abner-1 <Abner199709@gmail.com>
2024-06-04 16:11:36 +08:00
Abner 1045e6c902
fix markdown linter checkout err (#1638)
Signed-off-by: Abner-1 <Abner199709@gmail.com>
2024-06-04 13:45:36 +08:00
berg 6d3199bb74
sidecarSet initContainer support InjectPolicy (#1617)
Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>
2024-06-04 09:22:36 +08:00
dependabot[bot] 0e69ed4bec
Bump actions/checkout from 2 to 4 (#1590)
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Commits](https://github.com/actions/checkout/compare/v2...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-31 15:05:32 +08:00
alingse 89d9558dd5
fix: fix miss makezero bug (#1628)
Signed-off-by: alingse <alingse@foxmail.com>
2024-05-27 10:29:28 +08:00
HrimfaxiYKW a836e90578
Signed-off-by: Colvin-Y <ykwhrimfaxi@gmail.com> (#1623)
update CI test image centos:6.7 to centos:7 to support run CI on arm
2024-05-15 19:15:17 +08:00
dependabot[bot] 13fe9ca274
Bump actions/upload-artifact from 4.3.2 to 4.3.3 (#1603)
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4.3.2 to 4.3.3.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](1746f4ab65...65462800fd)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  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>
2024-05-14 09:44:16 +08:00
dependabot[bot] 18d3f4a72f
Bump ossf/scorecard-action from 2.3.1 to 2.3.3 (#1620)
Bumps [ossf/scorecard-action](https://github.com/ossf/scorecard-action) from 2.3.1 to 2.3.3.
- [Release notes](https://github.com/ossf/scorecard-action/releases)
- [Changelog](https://github.com/ossf/scorecard-action/blob/main/RELEASE.md)
- [Commits](0864cf1902...dc50aa9510)

---
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>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-14 09:43:16 +08:00
dependabot[bot] 25f3d109e9
Bump golangci/golangci-lint-action from 5.3.0 to 6.0.1 (#1619)
Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 5.3.0 to 6.0.1.
- [Release notes](https://github.com/golangci/golangci-lint-action/releases)
- [Commits](https://github.com/golangci/golangci-lint-action/compare/v5.3.0...v6.0.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-14 09:42:16 +08:00
berg 1bc8d85593
sidecarset support k8s 1.28 sidecarContainers (#1613)
Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>
2024-05-10 11:39:12 +08:00
dependabot[bot] b969432910
Bump crate-ci/typos from 1.20.9 to 1.21.0 (#1609)
Bumps [crate-ci/typos](https://github.com/crate-ci/typos) from 1.20.9 to 1.21.0.
- [Release notes](https://github.com/crate-ci/typos/releases)
- [Changelog](https://github.com/crate-ci/typos/blob/master/CHANGELOG.md)
- [Commits](https://github.com/crate-ci/typos/compare/v1.20.9...v1.21.0)

---
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>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-08 17:16:10 +08:00
MichaelRren 4c3b681287
fix: make docker-multiarch failed with vendor errors (#1601)
Signed-off-by: haoshi.ren <haoshi.ren@smartx.com>
Co-authored-by: haoshi.ren <haoshi.ren@smartx.com>
2024-05-08 14:17:10 +08:00
Abner 9959b03b26
upgrade k8s deps to 1.28 (#1598)
Signed-off-by: Abner-1 <Abner199709@gmail.com>
2024-05-08 09:28:11 +08:00
dependabot[bot] ef5e25003b
Bump golangci/golangci-lint-action from 4.0.0 to 5.3.0 (#1610)
Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 4.0.0 to 5.3.0.
- [Release notes](https://github.com/golangci/golangci-lint-action/releases)
- [Commits](https://github.com/golangci/golangci-lint-action/compare/v4.0.0...v5.3.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-06 20:51:09 +08:00
Abner 879777b48e
recreate po when vct changed, pass unit test, add vctemplate changes in cloneset e2e case (#1561)
ignore vct hash changes when inplace-only update strategy type
add feature gate and test both case in ut

Signed-off-by: Abner-1 <Abner199709@gmail.com>
2024-04-30 10:43:03 +08:00
dependabot[bot] 313bb1569f
Bump helm/kind-action from 1.9.0 to 1.10.0 (#1605)
Bumps [helm/kind-action](https://github.com/helm/kind-action) from 1.9.0 to 1.10.0.
- [Release notes](https://github.com/helm/kind-action/releases)
- [Commits](https://github.com/helm/kind-action/compare/v1.9.0...v1.10.0)

---
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>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-29 18:53:02 +08:00
Abner 353d334aec
add 1.6.3 cve-fix changelog (#1592)
Signed-off-by: Abner-1 <Abner199709@gmail.com>
2024-04-25 11:51:59 +08:00
KaiShi f32a7c8e20
add liveness probe proposal (#1552)
Signed-off-by: jicheng.sk <jicheng.sk@alibaba-inc.com>
2024-04-25 09:15:01 +08:00
Abner 2c4261c0e1
bump docker/docker,x/sys (#1591)
Signed-off-by: Abner-1 <Abner199709@gmail.com>
2024-04-24 14:01:57 +08:00
Chongzhi Deng 5cf50f7afd
fix: pod-readiness-controller use Patch to modify Pod (#1560)
Signed-off-by: BruceAko <chongzhi@hust.edu.cn>
2024-04-23 20:28:00 +08:00
ls-2018 36cc7d8cbe
fix: WorkloadSpread feature judgment (#1566)
Signed-off-by: acejilam <acejilam@gmail.com>
2024-04-23 20:25:00 +08:00
opencmit2 2da1b905c3
Fixed an issue where pub webhooks unexpectedly return error when PUB is NOT FOUND (#1579)
* Fixed an issue where pub webhooks unexpectedly return error when PUB is NOT FOUND

Signed-off-by: JinXinWang <opencmit2@126.com>

* Fixed an issue where pub webhooks unexpectedly return error when PUB is NOT FOUND

Signed-off-by: JinXinWang <opencmit2@126.com>

* Fixed an issue where pub webhooks unexpectedly return error when PUB is NOT FOUND

Signed-off-by: JinXinWang <opencmit2@126.com>

---------

Signed-off-by: JinXinWang <opencmit2@126.com>
2024-04-23 19:39:57 +08:00
dependabot[bot] 38f432f05b
Bump actions/upload-artifact from 4.3.1 to 4.3.2 (#1589)
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4.3.1 to 4.3.2.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](5d5d22a312...1746f4ab65)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  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>
2024-04-22 20:43:55 +08:00
Abner 2aea71584e
update vuluerable package such as docker/sys/otelgrpc/k8s, delete containerd, add k8s replace 0.0.0 (#1586)
add docker unit test and ignore when docker socket not exist

Signed-off-by: Abner-1 <Abner199709@gmail.com>
2024-04-22 16:36:56 +08:00
dependabot[bot] ac9fb232ed
Bump crate-ci/typos from 1.13.10 to 1.20.9 (#1585)
Bumps [crate-ci/typos](https://github.com/crate-ci/typos) from 1.13.10 to 1.20.9.
- [Release notes](https://github.com/crate-ci/typos/releases)
- [Changelog](https://github.com/crate-ci/typos/blob/master/CHANGELOG.md)
- [Commits](https://github.com/crate-ci/typos/compare/v1.13.10...v1.20.9)

---
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>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-17 20:46:52 +08:00
Zhen Zhang f244b7ab34
fix typo and remove incident-response (#1584)
Signed-off-by: 守辰 <shouchen.zz@alibaba-inc.com>
2024-04-17 17:21:52 +08:00
Lan 2753c3a4dd
Add permission of security-events write for ghaction golangci-lint. (#1582)
Signed-off-by: Lan Liang <gcslyp@gmail.com>
2024-04-17 09:50:51 +08:00
Zhen Zhang 61d1b42028
update security policy and contacts (#1580)
Signed-off-by: 守辰 <shouchen.zz@alibaba-inc.com>
2024-04-16 20:36:50 +08:00
dependabot[bot] 142458151b
Bump github/codeql-action from 2 to 3 (#1574)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2 to 3.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Commits](https://github.com/github/codeql-action/compare/v2...v3)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-16 15:05:51 +08:00
dependabot[bot] 6cc11204c9
Bump helm/kind-action from 1.3.0 to 1.9.0 (#1577)
Bumps [helm/kind-action](https://github.com/helm/kind-action) from 1.3.0 to 1.9.0.
- [Release notes](https://github.com/helm/kind-action/releases)
- [Commits](https://github.com/helm/kind-action/compare/v1.3.0...v1.9.0)

---
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>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-16 13:59:50 +08:00
dependabot[bot] e48285dee1
Bump actions/cache from 2 to 4 (#1571)
Bumps [actions/cache](https://github.com/actions/cache) from 2 to 4.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v2...v4)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-16 13:54:50 +08:00
dependabot[bot] 5f125c36dc
Bump actions/upload-artifact from 3.1.0 to 4.3.1 (#1578)
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3.1.0 to 4.3.1.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](3cea537223...5d5d22a312)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-16 13:21:50 +08:00
dependabot[bot] 9b722ca922
Bump actions/setup-go from 3 to 5 (#1572)
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 3 to 5.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](https://github.com/actions/setup-go/compare/v3...v5)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-16 13:00:50 +08:00
dependabot[bot] 01a75b61bb
Bump ossf/scorecard-action from 2.1.2 to 2.3.1 (#1575)
Bumps [ossf/scorecard-action](https://github.com/ossf/scorecard-action) from 2.1.2 to 2.3.1.
- [Release notes](https://github.com/ossf/scorecard-action/releases)
- [Changelog](https://github.com/ossf/scorecard-action/blob/main/RELEASE.md)
- [Commits](e38b1902ae...0864cf1902)

---
updated-dependencies:
- dependency-name: ossf/scorecard-action
  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>
2024-04-16 12:02:51 +08:00
dependabot[bot] 67c3b2124c
Bump codecov/codecov-action from 3 to 4 (#1573)
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 3 to 4.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/v3...v4)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-16 11:03:50 +08:00
Lan 046a014d5a
Add dependabot config for auto-update github-actions. (#1570)
Signed-off-by: Lan Liang <gcslyp@gmail.com>
2024-04-16 09:31:50 +08:00
Abner ecfc55ce40
add cri version notice in v1.6.0 changelog (#1569)
Signed-off-by: Abner-1 <Abner199709@gmail.com>
2024-04-16 09:30:53 +08:00
Maj Lu 587f344029
structured logging for pkg/control (#1565)
Signed-off-by: MajLu <majlu@qq.com>
2024-04-15 13:35:51 +08:00
Lan 8f98ce45de
chore: remove vendor (#1554)
Signed-off-by: Lan Liang <gcslyp@gmail.com>
2024-04-15 10:05:56 +08:00
ls-2018 8bb89648de
feature: Optimizing Pod SidecarSet webhook performance (#1547)
Signed-off-by: acejilam <acejilam@gmail.com>
2024-04-08 11:52:46 +08:00
Peng Peng 0d0031a377
Upgrade opencontainers/runc (1.1.12) and controller-gen (0.14.0) (#1562)
* Upgrade opencontainers/runc to 1.1.12

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

* keep using go 1.19

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

* revert change to config/manager/kustomization.yaml

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

---------

Signed-off-by: ppbits <ppbits3@gmail.com>
2024-04-07 11:28:46 +08:00
berg ac3fa111a1
change log 1.6.2 (#1559)
Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>
2024-04-02 20:41:41 +08:00
Zhen Zhang 1f00e6b64a
Fix flaky ut (#1556)
* update meeting time and links for community call

Signed-off-by: 守辰 <shouchen.zz@alibaba-inc.com>

* update meeting time and links for community call

Signed-off-by: 守辰 <shouchen.zz@alibaba-inc.com>

* fix flaky unit test

Signed-off-by: 守辰 <shouchen.zz@alibaba-inc.com>

---------

Signed-off-by: 守辰 <shouchen.zz@alibaba-inc.com>
2024-04-01 16:32:40 +08:00
Oleksandr Vorona 9e01c36bb8
fix: workloadspread validation message (#1553)
Signed-off-by: Alex Vorona <alex@vorona.com.ua>
2024-04-01 14:12:40 +08:00
sh 1f7b691655
fix: cloneset revision update (#1549)
Signed-off-by: suhe <suhe@njust.edu.cn>
2024-04-01 14:01:39 +08:00
KaiShi 014b824360
fix:setup-envtest ut err, ref: https://github.com/janus-idp/operator/pull/278/files (#1548)
Signed-off-by: jicheng.sk <jicheng.sk@alibaba-inc.com>
2024-03-28 20:08:36 +08:00
berg 912de49a6d
changelog 1.6.1 and 1.5.3 (#1532)
Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>
2024-03-21 15:03:29 +08:00
berg f843b85bde
Fix when statefulset reserveOrdinals exist, scale down pvc failed (#1531)
Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>
2024-03-21 15:01:29 +08:00
KaiShi d3cae3dbc6
update go mod, remove dep replace (#1527)
Signed-off-by: jicheng.sk <jicheng.sk@alibaba-inc.com>
Co-authored-by: jicheng.sk <jicheng.sk@alibaba-inc.com>
2024-03-20 19:07:29 +08:00
berg fd7e86e874
PodWebhook=false will not disable ResourcesDeletionProtection (#1526)
* PodWebhook=false will not disable ResourcesDeletionProtection

Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>

* changelog feature no longer work for resources under namespace kube-system

Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>

* change imagepulljob reconcile RequeueAfter=5s

Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>

---------

Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>
2024-03-20 15:34:28 +08:00
KaiShi 7270f40d4a
add_enhanced_livenessProbe_webhook (#1467)
Signed-off-by: jicheng.sk <jicheng.sk@alibaba-inc.com>
Co-authored-by: jicheng.sk <jicheng.sk@alibaba-inc.com>
2024-03-20 09:47:28 +08:00
Zhen Zhang dad39bc2a2
reduce github action permissions (#1523)
Signed-off-by: 守辰 <shouchen.zz@alibaba-inc.com>
2024-03-18 09:36:26 +08:00
berg 5de32b74b2
changelog 1.6.0 (#1522)
Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>
2024-03-15 10:53:24 +08:00
KaiShi c33088b5e7
update 1.26 v2 (#1511)
Signed-off-by: jicheng.sk <jicheng.sk@alibaba-inc.com>
Co-authored-by: jicheng.sk <jicheng.sk@alibaba-inc.com>
2024-03-13 18:06:28 +08:00
liuzhenwei 861818ebd4
Sidecar terminator ignore the exit code of the sidecar container (#1303)
add ut



add some comments and simplified some code



remove unnecessary pod status operations



change pod to terminal phase before create crr



reverse the checking to reduce code indentation



simplified some logic



remove unesd code and rename function avoid misleading

Signed-off-by: liuzhenwei <dui_zhang@163.com>
2024-03-13 13:08:21 +08:00
Jeremy 209d476cd8
fix: validate update AdvancedDaemonSet (#1505)
* fix: validate update AdvancedDaemonSet

Signed-off-by: hantmac <hantmac@outlook.com>

refactor it

fix

fix

Signed-off-by: hantmac <hantmac@outlook.com>

* fix ut

Signed-off-by: hantmac <hantmac@outlook.com>

---------

Signed-off-by: hantmac <hantmac@outlook.com>
2024-03-08 13:23:17 +08:00
dongjiang c7e1daaf67
chores: use golang standard errors (#1518)
* use golang standard errors

Signed-off-by: dongjiang1989 <dongjiang1989@126.com>

* update test_context.go

Signed-off-by: dongjiang1989 <dongjiang1989@126.com>

* add unittest casae

Signed-off-by: dongjiang1989 <dongjiang1989@126.com>

* fix unittest

Signed-off-by: dongjiang1989 <dongjiang1989@126.com>

* add golangci lint

Signed-off-by: dongjiang1989 <dongjiang1989@126.com>

---------

Signed-off-by: dongjiang1989 <dongjiang1989@126.com>
2024-03-08 09:59:18 +08:00
kevin1689-cloud 04254fb47b
add: Support the deletion protection of service and ingress (#1269)
Signed-off-by: kevin1689 <kevinyang1689@163.com>
2024-03-07 09:57:16 +08:00
Jeremy 6bb78c4579
fix: upgrade minimum dockerapi version (#1510)
* fix: upgrade minimum dockerapi version

Signed-off-by: hantmac <hantmac@outlook.com>

* fix codecov

Signed-off-by: hantmac <hantmac@outlook.com>

---------

Signed-off-by: hantmac <hantmac@outlook.com>
2024-03-01 09:24:11 +08:00
berg 63bc96e8ea
optimize imagepulljob code (#1514)
Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>
2024-03-01 09:21:10 +08:00
JieWu 3b7c731ebf
update pub readiness check in pub validating (#1512)
Signed-off-by: Spground <pingshan.wj@alibaba-inc.com>
Co-authored-by: Spground <pingshan.wj@alibaba-inc.com>
2024-02-28 10:20:09 +08:00
KaiShi 2dcebc6eed
support tcpCheck in podProbe (#1474)
Signed-off-by: jicheng.sk <jicheng.sk@alibaba-inc.com>
Co-authored-by: jicheng.sk <jicheng.sk@alibaba-inc.com>
2024-02-28 09:37:09 +08:00
berg 5421ee7c8e
Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com> (#1495)
Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>
2024-01-26 14:35:43 +08:00
liheng.zms a1ac702547 1.5.2 changelog
Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>
2024-01-26 10:28:51 +08:00
berg 9913b924e5
start kruise-manager as a non-root user (#1491)
Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>
2024-01-24 20:57:37 +08:00
berg 19854e846a
Revert "fix deleteAvailableLimit bug (#1481)" (#1487)
* Revert "fix deleteAvailableLimit bug (#1481)"

This fix is incorrect.

This reverts commit f4e238fd8d.

Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>

* add cloneset scale ut

Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>

---------

Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>
2024-01-24 11:09:37 +08:00
Yak2p 8af135d41a
fix(statefulset): fix maxUnavailable for rolling upgrades not taking into account pods that fail later in the updateIndexes. (#1480)
Signed-off-by: Yesphet <mildtheorem@gmail.com>
2024-01-23 17:35:36 +08:00
Siyu Wang 17d8d4b93a
Optimize container launch priority performance (#1490)
Signed-off-by: FillZpp <FillZpp.pub@gmail.com>
2024-01-23 14:27:37 +08:00
ChrisLiu 30a660b530
sync podCondition when probe message of NodePodProbe changed (#1479)
Signed-off-by: ChrisLiu <chrisliu1995@163.com>
2024-01-11 20:41:26 +08:00
berg 6f1b1d4f48
restrict the access permissions of kruise-daemon to secrets (#1482)
* restrict the access permissions of kruise-daemon to secrets

Signed-off-by: mingzhou.swx <mingzhou.swx@alibaba-inc.com>

* util meta ut

Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>

---------

Signed-off-by: mingzhou.swx <mingzhou.swx@alibaba-inc.com>
Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>
Co-authored-by: mingzhou.swx <mingzhou.swx@alibaba-inc.com>
2024-01-04 17:34:19 +08:00
berg f4e238fd8d
fix deleteAvailableLimit bug (#1481)
* fix deleteAvailableLimit bug

Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>

* add clonesets scale ut

Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>

---------

Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>
2024-01-03 19:18:18 +08:00
Wei-Xiang Sun fa7a1da05e
workloadspread support rolling update (#1197)
Signed-off-by: mingzhou.swx <mingzhou.swx@alibaba-inc.com>
Co-authored-by: mingzhou.swx <mingzhou.swx@alibaba-inc.com>
2023-12-26 10:56:10 +08:00
cola 891ce971b9
fix no test cases actually run in controller_revision_test file (#1457)
Signed-off-by: pingjiang <xiangpingjiang1998@gmail.com>
2023-12-20 13:54:05 +08:00
kim 1f7f06f310
fix: find spec.replicas from unstructured object (#1462)
Signed-off-by: kim <4017010+0xgj@users.noreply.github.com>
2023-12-19 19:49:04 +08:00
ls-2018 fa9a9a040f
- (#1431)
Signed-off-by: 刘硕 <liushuo@zetyun.com>
Co-authored-by: 刘硕 <liushuo@zetyun.com>
2023-12-11 09:44:56 +08:00
Wei-Xiang Sun 28c0a720dc
[Fix] ResourceDistribution should watch unstructured object (#1464)
* fix resourcedistribution event watch

Signed-off-by: mingzhou.swx <mingzhou.swx@alibaba-inc.com>

* fix image list pull job e2e

Signed-off-by: mingzhou.swx <mingzhou.swx@alibaba-inc.com>

---------

Signed-off-by: mingzhou.swx <mingzhou.swx@alibaba-inc.com>
Co-authored-by: mingzhou.swx <mingzhou.swx@alibaba-inc.com>
2023-12-08 09:52:53 +08:00
Zhen Zhang 6a62320848
Create codeql.yml and fix e2e (#1461)
Signed-off-by: 守辰 <shouchen.zz@alibaba-inc.com>
2023-12-01 14:31:48 +08:00
Wei-Xiang Sun f8994e730e
add 1.5.1 change log (#1449)
Signed-off-by: mingzhou.swx <mingzhou.swx@alibaba-inc.com>
Co-authored-by: mingzhou.swx <mingzhou.swx@alibaba-inc.com>
2023-11-23 13:42:40 +08:00
berg 7bcaa1b466
OpenSSF Scorecard (#1445)
Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>
2023-11-22 13:55:39 +08:00
ls-2018 c272055737
[Feature] Add force image pull (#1385)
Signed-off-by: 刘硕 <liushuo@zetyun.com>
Co-authored-by: 刘硕 <liushuo@zetyun.com>
2023-11-16 09:43:36 +08:00
Wei-Xiang Sun 01717ff47d
add some important events for ephemeral job (#1454)
Signed-off-by: mingzhou.swx <mingzhou.swx@alibaba-inc.com>
Co-authored-by: mingzhou.swx <mingzhou.swx@alibaba-inc.com>
2023-11-14 11:05:08 +08:00
a932846905 4e80be5567
fix only initContainers without hash problem (#1453)
Signed-off-by: chrisdeng <chrisdeng@futunn.com>
Co-authored-by: chrisdeng <chrisdeng@futunn.com>
2023-11-10 16:50:05 +08:00
Wei-Xiang Sun 0b2fc0e402
add controller-revision-hash for imageListPullJob (#1441)
Signed-off-by: mingzhou.swx <mingzhou.swx@alibaba-inc.com>
Co-authored-by: mingzhou.swx <mingzhou.swx@alibaba-inc.com>
2023-11-06 16:03:01 +08:00
berg aafd16b60a
add pub&deletion_protection audit log (#1438)
Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>
2023-10-25 13:33:49 +08:00
Wei-Xiang Sun 18b15d5e52
Add subset capacity planning for UnitedDeployment (#1428)
* add subset minReplicas&maxReplicas api for UnitedDeployment

Signed-off-by: mingzhou.swx <mingzhou.swx@alibaba-inc.com>

* add subset capacity planning for UnitiedDeployment

Signed-off-by: mingzhou.swx <mingzhou.swx@alibaba-inc.com>

---------

Signed-off-by: mingzhou.swx <mingzhou.swx@alibaba-inc.com>
Co-authored-by: mingzhou.swx <mingzhou.swx@alibaba-inc.com>
2023-10-25 09:23:49 +08:00
ls-2018 b9484d6ad6
Reduce the number of updateNodePodProbes calls (#1430)
Signed-off-by: 刘硕 <liushuo@zetyun.com>
Co-authored-by: 刘硕 <liushuo@zetyun.com>
2023-10-17 14:33:42 +08:00
berg 85cece5248
fix sidecarset upgrade exception for UpdateExpectations (#1435)
Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>
2023-10-16 13:04:43 +08:00
ls-2018 459efe6b9c
🐛 Fixed some error messages (#1429)
Signed-off-by: 刘硕 <liushuo@zetyun.com>
Co-authored-by: 刘硕 <liushuo@zetyun.com>
2023-10-09 11:31:35 +08:00
berg 81b5d527fe
fix sidecarset ExpectUpdated block upgrade container (#1424)
Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>
2023-09-25 11:05:23 +08:00
berg 648845594c Create scorecard.yml
Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>
2023-09-21 13:05:47 +08:00
lilongfeng 12e6c3801d
put parameters into constants (#1414)
Signed-off-by: 李龙峰 <lilongfeng@inspur.com>
2023-09-19 16:38:18 +08:00
xingdashu 1a62466578
Update main.go (#1407)
use leases

Signed-off-by: dsxing <xingdashuaostr@126.com>
2023-09-19 16:37:23 +08:00
chengjoey 73db67c95a
feature request that add enable pprof flag for deamon (#1416)
Signed-off-by: joey <zchengjoey@gmail.com>
2023-09-19 16:36:18 +08:00
y-ykcir f41c91f05e
update merge annotation for kruise apis (#1402)
* update merge annotation for apis

Signed-off-by: ricky <yricky509@gmail.com>

* fix sidecarset ut and change annotation

Signed-off-by: ricky <yricky509@gmail.com>

---------

Signed-off-by: ricky <yricky509@gmail.com>
2023-09-19 16:35:17 +08:00
chengleqi a46e941018
Add proposal of UnitedDeployment Patch (#1265)
fix markdownlint-misspell



fix typo in patch resource sample

Signed-off-by: chengleqi <chengleqi5g@hotmail.com>
2023-09-07 19:14:08 +08:00
guangwu d0f7da9a70
chore: remove refs to deprecated io/ioutil (#1404)
* chore: remove refs to deprecated io/ioutil

Signed-off-by: guoguangwu <guoguangwu@magic-shield.com>

* fix: gofmt checker.go

Signed-off-by: guoguangwu <guoguangwu@magic-shield.com>

---------

Signed-off-by: guoguangwu <guoguangwu@magic-shield.com>
2023-09-07 10:24:06 +08:00
guangwu 6e65595c50
chore: unnecessary use of fmt.Sprintf (#1403)
Signed-off-by: guoguangwu <guoguangwu@magic-shield.com>
2023-09-06 17:05:07 +08:00
berg 2774109fe5
add prometheus for pub and deletion protection (#1398)
Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>
2023-09-06 16:23:06 +08:00
Siyu Wang ebcee23ad6
Fix EphemeralJob event handler for deleting object (#1401)
Signed-off-by: FillZpp <FillZpp.pub@gmail.com>
2023-09-06 09:28:05 +08:00
berg a477df8066
Trimming the kruise image to remove some non-essential commands (#1397)
* wrokflow docker image ci

Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>

* Trimming the kruise image to remove some non-essential commands

Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>

---------

Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>
2023-09-01 09:50:01 +08:00
berg e5197dea9d
wrokflow docker image ci (#1393)
Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>
2023-08-30 17:02:00 +08:00
ls-2018 b483f4a4cd
[fix] change DefaultNamespaceDeletionTimeout (#1391)
Signed-off-by: 刘硕 <liushuo@zetyun.com>
Co-authored-by: 刘硕 <liushuo@zetyun.com>
2023-08-29 21:18:59 +08:00
Zhen Zhang f7e1bb0a22
update meeting time and links for community call (#1382)
update meeting time and links for community call

Signed-off-by: 守辰 <shouchen.zz@alibaba-inc.com>
2023-08-29 13:09:58 +08:00
berg 99ea20ce99
set clonesets updatedAvailableReplicas omitempty (#1390)
Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>
2023-08-28 16:55:58 +08:00
ls-2018 e6205a5b0d
[WIP] Use utilruntime.Must enhanced check (#1373)
Signed-off-by: acejilam <acejilam@gmail.com>
2023-08-21 09:35:51 +08:00
Wei-Xiang Sun 9ccd897832
update 1.5.0 changeLog (#1372)
Signed-off-by: mingzhou.swx <mingzhou.swx@alibaba-inc.com>
Co-authored-by: mingzhou.swx <mingzhou.swx@alibaba-inc.com>
2023-08-16 17:40:47 +08:00
berg efadf651f2
add DeletionProtectionForCRDCascadingGate (#1365)
Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>
2023-08-16 14:08:47 +08:00
Wei-Xiang Sun 27d01ec33b
add 1.5.0 change log (#1361)
Signed-off-by: mingzhou.swx <mingzhou.swx@alibaba-inc.com>
Co-authored-by: mingzhou.swx <mingzhou.swx@alibaba-inc.com>
2023-08-16 14:07:47 +08:00
Kuromesi 3807870e47
change version of controller-runtime to v0.12.3 (#1370)
Signed-off-by: Kuromesi <blackfacepan@163.com>
2023-08-16 14:02:47 +08:00
Nash Tsai 338c8dec2f
chore: update envtest Makefile job (#1367)
chore: upgrade controller-gen@v0.9.0 to comply with k8s.io/api v0.24.x

Signed-off-by: Nash Tsai <nash.tsai@gmail.com>
2023-08-16 13:56:46 +08:00
berg 321c9912b0
add resourcesdistribution featuregate (#1360)
Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>
2023-08-10 10:03:42 +08:00
Kuromesi 6d18d2e69c
Bump K8s dependency to 1.24.16, golang vesion 1.19 (#1354)
* Bump K8s dependency to 1.24.16, golang to 1.19

Signed-off-by: Kuromesi <blackfacepan@163.com>

* update daemonset and statefulset to 1.24.16

Signed-off-by: Kuromesi <blackfacepan@163.com>

* compatible with v1 and v1alpha2 cri api version

Signed-off-by: mingzhou.swx <mingzhou.swx@alibaba-inc.com>

update cloneset ut for go 1.19

Signed-off-by: mingzhou.swx <mingzhou.swx@alibaba-inc.com>

---------

Signed-off-by: Kuromesi <blackfacepan@163.com>
Signed-off-by: mingzhou.swx <mingzhou.swx@alibaba-inc.com>
Co-authored-by: mingzhou.swx <mingzhou.swx@alibaba-inc.com>
2023-08-08 19:55:45 +08:00
berg 21c08469b9
add imagepulljob featuregate (#1357)
* add imagepulljob featuregate

Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>

* add e2e for imagepulljob secret

Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>

---------

Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>
2023-08-08 19:13:40 +08:00
Wei-Xiang Sun 7da41b9862
cloneset watch changes to pods' ownerRef (#1358)
Signed-off-by: mingzhou.swx <mingzhou.swx@alibaba-inc.com>
Co-authored-by: mingzhou.swx <mingzhou.swx@alibaba-inc.com>
2023-08-07 17:43:39 +08:00
HrimfaxiYKW 915b0ab907
[enhancement] fix comment error for function isJobFailed of broadcastjob (#1348)
Signed-off-by: Colvin-Y <ykwhrimfaxi@gmail.com>
2023-08-04 17:28:35 +08:00
ls-2018 a44ca547cb
Fix tools/kind are lost (#1355)
Signed-off-by: acejilam <acejilam@gmail.com>
2023-08-03 11:52:35 +08:00
Wei-Xiang Sun 76f45ac2a5
veophi apply to become an owner of kruise (#1350)
Signed-off-by: mingzhou.swx <mingzhou.swx@alibaba-inc.com>
Co-authored-by: mingzhou.swx <mingzhou.swx@alibaba-inc.com>
2023-07-28 19:12:30 +08:00
HrimfaxiYKW d948587567
enhancement: ambiguous function name of isSidecarSetNotUpdate (#1343)
Signed-off-by: Colvin-Y <ykwhrimfaxi@gmail.com>
2023-07-27 13:43:29 +08:00
berg 4e35a1d613
optimize webhook patchResponse function (#1334)
Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>
2023-07-18 10:52:20 +08:00
berg 6ec9deeb40
support parameter set CacheSyncTimeout for controller (#1329)
Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>
2023-07-10 16:34:14 +08:00
Mark Lumin 3d39726c81
add condition and event info for not upgradable pods when update sidecarset (#1272) (#1309)
* add condition for pods and event for sidecarset when detecting not upgradable pod (#1272)

Signed-off-by: MarkLux <marlx6590@163.com>

* add e2e test for sidecarset upgrade out of image fields(#1272)

Signed-off-by: MarkLux <marlx6590@163.com>

* only update condition to true when all sidecarset upgradable (#1272)

Signed-off-by: MarkLux <marlx6590@163.com>

---------

Signed-off-by: MarkLux <marlx6590@163.com>
2023-07-10 10:22:13 +08:00
Nitish Chauhan 24a4b7f5b0
adding updatedAvailableReplicas field (#1317)
* adding updatedAvailableReplicas field

Signed-off-by: ntishchauhan0022 <nitishchauhan0022@gmail.com>

* resolving linting error and some check for updatedavailabel replica

Signed-off-by: ntishchauhan0022 <nitishchauhan0022@gmail.com>

* fixing typo

Signed-off-by: ntishchauhan0022 <nitishchauhan0022@gmail.com>

---------

Signed-off-by: ntishchauhan0022 <nitishchauhan0022@gmail.com>
2023-07-06 10:16:10 +08:00
liuzhenwei d16f01b21a
add proposal for ImageListPullJob (#1254)
Signed-off-by: liuzhenwei <dui_zhang@163.com>
2023-07-06 10:11:09 +08:00
cola 33c9ce172e
cloneset ignore maxSurge when UpdateStrategyPaused=true (#1324)
* cloneset ignore maxSurge when UpdateStrategyPaused=true

Signed-off-by: pingjaing <xiangpingjiang1998@gmail.com>

* add scale down  UT case for cloneSet UpdateStrategyPaused=true

Signed-off-by: pingjaing <xiangpingjiang1998@gmail.com>

* add UTs for cloneSet when UpdateStrategyPaused=true

Signed-off-by: pingjiang <xiangpingjiang1998@gmail.com>

---------

Signed-off-by: pingjaing <xiangpingjiang1998@gmail.com>
Signed-off-by: pingjiang <xiangpingjiang1998@gmail.com>
2023-07-05 13:44:09 +08:00
y-ykcir 5e8a991cb4
feat: SidecarSet updateStrategy support priorityStrategy (#1325)
* feat: SidecarSet updateStrategy support priorityStrategy

Signed-off-by: ricky <yricky509@gmail.com>

* add ut for sidecarset priority strategy

Signed-off-by: ricky <yricky509@gmail.com>

---------

Signed-off-by: ricky <yricky509@gmail.com>
2023-07-04 16:31:08 +08:00
Wei-Xiang Sun 6ca91fe04e
preparing update pod as update pod when scaling (#1290)
Signed-off-by: mingzhou.swx <mingzhou.swx@alibaba-inc.com>
Co-authored-by: mingzhou.swx <mingzhou.swx@alibaba-inc.com>
2023-06-28 17:19:03 +08:00
Hinsteny Hisoka ffe60f2600
feat: Support run e2e test casese in local (#1316)
Signed-off-by: Hinsteny <hinsteny@gmail.com>
2023-06-26 15:36:01 +08:00
liuzhenwei ffcf1898fd
add status.labelSelector field to unitedDeployment to support scale sub-resource (#1314)
Signed-off-by: liuzhenwei <dui_zhang@163.com>
2023-06-15 09:54:51 +08:00
y-ykcir 9e74506ca8
feat: Optimize UnitedDeployment replicas settings (#1247)
Signed-off-by: ricky <yricky509@gmail.com>
2023-06-13 19:36:49 +08:00
Nitish Chauhan e0df5811df
adding unit test for hash (#1311)
* adding unit test for hash

Signed-off-by: ntishchauhan0022 <nitishchauhan0022@gmail.com>

* resolving linting

Signed-off-by: ntishchauhan0022 <nitishchauhan0022@gmail.com>

---------

Signed-off-by: ntishchauhan0022 <nitishchauhan0022@gmail.com>
2023-06-12 19:20:49 +08:00
chengleqi 6d2536631f
Add validation for the WorkloadSpreadSubset patch field (#1237)
Signed-off-by: chengleqi <chengleqi5g@hotmail.com>
2023-06-06 10:38:42 +08:00
chengleqi 6fda363d2d
add patch for UnitedDeployment (#1266)
generate manifests and fix goimports



fix goimports



patch to PodTemplateSpec



add ut for uniteddeployment patch

Signed-off-by: chengleqi <chengleqi5g@hotmail.com>
2023-06-05 16:02:42 +08:00
kevin1689-cloud 19240cf0e6
fix: modify the ginkgo.By name of pvc deletion protection e2e (#1304)
Signed-off-by: kevin1689 <kevinyang1689@163.com>
2023-06-05 09:25:42 +08:00
wangwu50 b7977a76ad
fix: SidecarSet Expectations Leakage Bug (#1301)
* fix: SidecarSet Expectations Leakage Bug

Signed-off-by: wangwenchao7 <wangwenchao7@xiaomi.com>

* fix: Modify the code as suggested

Signed-off-by: wangwenchao7 <wangwenchao7@xiaomi.com>

* fix: use ObserveUpdated func when update

Signed-off-by: wangwenchao7 <wangwenchao7@xiaomi.com>

* fix: observeUpdated before type check
Signed-off-by: wangwenchao7 <wangwenchao7@xiaomi.com>

---------

Signed-off-by: wangwenchao7 <wangwenchao7@xiaomi.com>
Co-authored-by: wangwenchao7 <wangwenchao7@xiaomi.com>
2023-06-01 16:22:39 +08:00
berg f2a9000c2c
modify e2e deletionprotection pvc resources (#1302)
Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>
2023-05-31 15:37:37 +08:00
ywdxz 94b9b584a0
fix: fixed a panic: assignment to entry in nil map (#1295)
Signed-off-by: 张望知 <zhangwangzhi@xiaomi.com>
Co-authored-by: 张望知 <zhangwangzhi@xiaomi.com>
2023-05-30 14:43:37 +08:00
Zhen Zhang 0ba98c547d
avoid mutate controllerrevision cache in predownloadimage (#1300)
Signed-off-by: 守辰 <shouchen.zz@alibaba-inc.com>
2023-05-29 12:46:35 +08:00
Wei-Xiang Sun 7d134bf83e
fix e2e for imageListPullJob (#1294)
Signed-off-by: mingzhou.swx <mingzhou.swx@alibaba-inc.com>
Co-authored-by: mingzhou.swx <mingzhou.swx@alibaba-inc.com>
2023-05-29 09:23:36 +08:00
Wei-Xiang Sun 95e42f3e1e
workloadspread support crd (#1286)
Signed-off-by: mingzhou.swx <mingzhou.swx@alibaba-inc.com>
Co-authored-by: mingzhou.swx <mingzhou.swx@alibaba-inc.com>
2023-05-23 13:33:31 +08:00
berg 40e62c6d42
Merge pull request #1291 from veophi/fix_update_status
Fix cloneSet extra status update logic
2023-05-22 20:41:19 +08:00
mingzhou.swx 0a30f706eb fix cloneset update extra status
Signed-off-by: mingzhou.swx <mingzhou.swx@alibaba-inc.com>
2023-05-22 19:50:57 +08:00
liuzhenwei db83b70fc0
Add ImageListPullJob to simplify ImagePullJob (#1222)
calculate status for imagelistpulljob



make generate manifests



add imagelistpulljob.status.status



make generate manifests



regist webhook handler

delete image pull job which is not existed in ImageListPullJob.Spec.Images



support the same behavior as image pull job for TTLSecondsAfterFinished and CompletionTime fields



resourceVersionExpectations



add ut



verify the maximum number of images cannot > 255



make generate manifests



add failled image pull job status



simplify imageListPullJobStatus and spec



fix mdlint



define ImagePullJobTemplate & fix imageliststatus when completionPolicy.Type is Never



fix,some print info



trigger ci



fix some issues of code



fix some logic of Expectations



Check for duplicate values of spec.images



move proposal doc to other PR



trigger ci&& modify comment



add e2e



remove phase field from status and and remove the unnecessary deepcopy

add ut for computeImagePullJobActions and fix some bugs

Signed-off-by: liuzhenwei <dui_zhang@163.com>
2023-05-19 14:15:28 +08:00
Wei-Xiang Sun b4364ed805
extend pull image response timeout to 10min (#1288)
Signed-off-by: mingzhou.swx <mingzhou.swx@alibaba-inc.com>
Co-authored-by: mingzhou.swx <mingzhou.swx@alibaba-inc.com>
2023-05-18 18:38:27 +08:00
Wei-Xiang Sun 210d87060b
merge update request of status and extra status for cloneset (#1278)
Signed-off-by: mingzhou.swx <mingzhou.swx@alibaba-inc.com>
Co-authored-by: mingzhou.swx <mingzhou.swx@alibaba-inc.com>
2023-05-15 14:37:24 +08:00
berg b39e08c2fe
optimize container launch priority event handler (#1283)
Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>
2023-05-12 14:43:21 +08:00
liuzhenwei ccd94b2225
update the image status when start pulling images & compare(without defaultDomain and officialRepoName) name and tag of image (#1280)
add ut for ContainsImage



revert import

Signed-off-by: liuzhenwei <dui_zhang@163.com>
2023-05-11 13:31:20 +08:00
berg 441afd9acf
Fix the issue of dependencies failing to pull in the Dockerfile. (#1279)
Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>
2023-05-08 19:31:17 +08:00
berg 437ba7035f
Fix the issue of missing Pods in pub list function (#1274)
Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>
2023-05-08 14:06:17 +08:00
Wei-Xiang Sun 7f5046dfa9
add default anno to sandbox-config when pulling image (#1259)
Signed-off-by: mingzhou.swx <mingzhou.swx@alibaba-inc.com>
Co-authored-by: mingzhou.swx <mingzhou.swx@alibaba-inc.com>
2023-04-17 14:46:58 +08:00
liuzhenwei 62b47397be
add apis for imagelistpulljob and ImagePullJobTemplate (#1258)
Signed-off-by: liuzhenwei <dui_zhang@163.com>
2023-04-17 14:37:58 +08:00
Liang Deng 6f9961c0fc
feat: Advanced Workload pre-download image support attach metadata in ImagePullJob (#1246)
Signed-off-by: Liang Deng <283304489@qq.com>
2023-04-15 09:15:56 +08:00
Wei-Xiang Sun 15bf5a4efd
upgrade github ci runner from ubuntu-18.04 to ubuntu-20.04 (#1255)
Signed-off-by: mingzhou.swx <mingzhou.swx@alibaba-inc.com>
Co-authored-by: mingzhou.swx <mingzhou.swx@alibaba-inc.com>
2023-04-12 14:08:54 +08:00
kevin1689-cloud 2418faed79
add: DeletionProtection mechanism reject Namespace deletion when PVCs in Bound status are included under NS (#1228) (#1228)
Signed-off-by: kevin1689 <kevinyang1689@163.com>
2023-04-07 14:39:50 +08:00
Junhua He 194e818f2f
Add missing finalizers permissions (#1235)
Signed-off-by: whitewindmills <jayfantasyhjh@gmail.com>
2023-04-07 14:38:50 +08:00
berg ec739942da
disable feature-gate PreDownloadImageForInPlaceUpdate by default (#1244)
Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>
2023-04-07 09:03:49 +08:00
berg 8d59840410
fix the matching logic for the imagePullSecret in ImagePullJob (#1241)
Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>
2023-03-30 19:50:43 +08:00
y-ykcir fa653fe417
Fix: serviceAccountToken volume error in sidecarset (#1238)
Signed-off-by: ricky <yricky509@gmail.com>
2023-03-27 16:18:42 +08:00
y-ykcir 1d1a54a1e0
fix: fix initContainers shareVolumePolicy (#1229)
Signed-off-by: ricky <yricky509@gmail.com>
2023-03-27 10:07:39 +08:00
berg 1d2c886ce2
Connecting to Pouch runtime via CRI interface (#1232)
Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>
2023-03-23 15:20:36 +08:00
weldonlwz 002c5b57d4
fix bcj doesn't make pod on node that has erased taint (#1204)
Signed-off-by: weldonli <weldonli@tencent.com>
Co-authored-by: weldonli <weldonli@tencent.com>
2023-03-23 13:08:36 +08:00
Shubham Urkade 99a3daeecb
Make OnFailure as default restartPolicy for broadcastjob (#1149)
Signed-off-by: Shubham Urkade <shubhamurkade1@gmail.com>
Co-authored-by: Shubham Urkade <surkade@surkade3MD6M.vmware.com>
2023-03-22 20:19:35 +08:00
6930 changed files with 68363 additions and 1807136 deletions

6
.codecov.yml Normal file
View File

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

17
.github/dependabot.yaml vendored Normal file
View File

@ -0,0 +1,17 @@
# This YAML configuration file is used to enable Dependabot for automated dependency management.
# Dependabot helps keep the project's dependencies up-to-date by automatically creating pull requests
# for outdated dependencies based on the version constraints defined in your project.
# For more information and customization options, please refer to the Dependabot documentation:
# Documentation: https://docs.github.com/en/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically
# Configuration options: https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
# Allow up to 10 open pull requests for update github-actions
# 5 by default
# see https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#open-pull-requests-limit
open-pull-requests-limit: 10
schedule:
# Check for updates to GitHub Actions every week
interval: "weekly"

View File

@ -5,13 +5,16 @@ on:
branches:
- master
- release-*
pull_request: {}
workflow_dispatch: {}
pull_request: { }
workflow_dispatch: { }
# Declare default permissions as read only.
permissions: read-all
env:
# Common versions
GO_VERSION: '1.18'
GOLANGCI_VERSION: 'v1.47'
GO_VERSION: '1.23'
GOLANGCI_VERSION: 'v2.1'
DOCKER_BUILDX_VERSION: 'v0.4.2'
# Common users. We can't run a step 'if secrets.AWS_USR != ""' but we can run
@ -23,28 +26,30 @@ env:
jobs:
typos-check:
name: Spell Check with Typos
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- name: Checkout Actions Repository
uses: actions/checkout@v3
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Check spelling with custom config file
uses: crate-ci/typos@v1.13.10
uses: crate-ci/typos@a67079b4ae32e18c3f53d75368c52ce53b5fb56b # v1.35.4
with:
config: ./typos.toml
golangci-lint:
runs-on: ubuntu-18.04
runs-on: ubuntu-24.04
permissions:
security-events: write
steps:
- name: Checkout Code
uses: actions/checkout@v3
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
submodules: true
- name: Setup Go
uses: actions/setup-go@v3
uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
with:
go-version: ${{ env.GO_VERSION }}
- name: Cache Go Dependencies
uses: actions/cache@v2
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
@ -53,14 +58,14 @@ jobs:
run: |
make generate
- name: Lint golang code
uses: golangci/golangci-lint-action@v3.2.0
uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 # v8.0.0
with:
version: ${{ env.GOLANGCI_VERSION }}
args: --verbose
skip-pkg-cache: true
mod: readonly
- name: Run Trivy vulnerability scanner in repo mode
uses: aquasecurity/trivy-action@master
uses: aquasecurity/trivy-action@77137e9dc3ab1b329b7c8a38c2eb7475850a14e8 # master
with:
scan-type: 'fs'
ignore-unfixed: true
@ -68,24 +73,24 @@ jobs:
output: 'trivy-results.sarif'
severity: 'CRITICAL'
- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@v2
uses: github/codeql-action/upload-sarif@df559355d593797519d70b90fc8edd5db049e7a2 # v3.29.9
with:
sarif_file: 'trivy-results.sarif'
markdownlint-misspell-shellcheck:
runs-on: ubuntu-18.04
# this image is build from Dockerfile
# https://github.com/pouchcontainer/pouchlinter/blob/master/Dockerfile
container: pouchcontainer/pouchlinter:v0.1.2
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Run misspell
run: find ./* -name "*" | grep -v vendor | xargs misspell -error
- name: Run shellcheck
run: find ./ -name "*.sh" | grep -v vendor | xargs shellcheck
- 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
# markdownlint-misspell-shellcheck:
# runs-on: ubuntu-24.04
# # this image is build from Dockerfile
# # https://github.com/pouchcontainer/pouchlinter/blob/master/Dockerfile
# container: pouchcontainer/pouchlinter:v0.1.2
# steps:
# - name: Checkout
# uses: actions/checkout@v3
# - name: Run misspell
# run: find ./* -name "*" | grep -v vendor | xargs misspell -error
# - name: Run shellcheck
# run: find ./ -name "*.sh" | grep -v vendor | xargs shellcheck
# - 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
# - name: Check markdown links
# run: |
# set +e
@ -100,19 +105,19 @@ jobs:
# bash -c "exit $code";
unit-tests:
runs-on: ubuntu-18.04
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
submodules: true
- name: Fetch History
run: git fetch --prune --unshallow
- name: Setup Go
uses: actions/setup-go@v3
uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
with:
go-version: ${{ env.GO_VERSION }}
- name: Cache Go Dependencies
uses: actions/cache@v2
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
@ -122,9 +127,42 @@ jobs:
make test
git status
- name: Publish Unit Test Coverage
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@fdcc8476540edceab3de004e990f80d881c6cc00 # v5.5.0
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: unittests
file: cover.out
- name: Check diff
run: '[[ -z $(git status -s) ]] || (printf "Existing modified/untracked files.\nPlease run \"make generate manifests\" and push again.\n"; exit 1)'
# 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

84
.github/workflows/codeql.yml vendored Normal file
View File

@ -0,0 +1,84 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"
on:
push:
branches: [ "master", "release-*"]
pull_request:
# The branches below must be a subset of the branches above
branches: [ "master" ]
permissions:
contents: read
jobs:
analyze:
name: Analyze
# Runner size impacts CodeQL analysis time. To learn more, please see:
# - https://gh.io/recommended-hardware-resources-for-running-codeql
# - https://gh.io/supported-runners-and-hardware-resources
# - https://gh.io/using-larger-runners
# Consider using larger runners for possible analysis time improvements.
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: [ 'go' ]
# CodeQL supports [ 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift' ]
# Use only 'java-kotlin' to analyze code written in Java, Kotlin or both
# Use only 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@df559355d593797519d70b90fc8edd5db049e7a2 # v3.29.9
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality
# 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)
- name: Autobuild
uses: github/codeql-action/autobuild@df559355d593797519d70b90fc8edd5db049e7a2 # v3.29.9
# 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
# If the Autobuild fails above, remove it and uncomment the following three lines.
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
# - run: |
# echo "Run, Build Application using script"
# ./location_of_script_within_repo/buildscript.sh
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@df559355d593797519d70b90fc8edd5db049e7a2 # v3.29.9
with:
category: "/language:${{matrix.language}}"

28
.github/workflows/docker-image.yaml vendored Normal file
View File

@ -0,0 +1,28 @@
name: Docker Image CI
on:
workflow_dispatch:
# Declare default permissions as read only.
permissions: read-all
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.HUB_KRIUSE }}
- name: Build the Docker image
run: |
docker buildx create --use --platform=linux/amd64,linux/arm64,linux/ppc64le --name multi-platform-builder
docker buildx ls
IMG=openkruise/kruise-manager:${{ github.ref_name }} make docker-multiarch

View File

@ -1,482 +0,0 @@
name: E2E-1.16
on:
push:
branches:
- master
- release-*
pull_request: {}
workflow_dispatch: {}
env:
# Common versions
GO_VERSION: '1.18'
KIND_VERSION: 'v0.14.0'
KIND_IMAGE: 'kindest/node:v1.16.15'
KIND_CLUSTER_NAME: 'ci-testing'
jobs:
astatefulset:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: ${{ env.GO_VERSION }}
- name: Setup Kind Cluster
uses: helm/kind-action@v1.3.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
exit $retVal
pullimages-containerrecreate:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: ${{ env.GO_VERSION }}
- name: Setup Kind Cluster
uses: helm/kind-action@v1.3.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)' 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
exit $retVal
advanced-daemonset:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: ${{ env.GO_VERSION }}
- name: Setup Kind Cluster
uses: helm/kind-action@v1.3.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
exit $retVal
sidecarset:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: ${{ env.GO_VERSION }}
- name: Setup Kind Cluster
uses: helm/kind-action@v1.3.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
exit $retVal
podUnavailableBudget:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: ${{ env.GO_VERSION }}
- name: Setup Kind Cluster
uses: helm/kind-action@v1.3.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
other:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: ${{ env.GO_VERSION }}
- name: Setup Kind Cluster
uses: helm/kind-action@v1.3.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 90m -v --skip='\[apps\] (StatefulSet|PullImage|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
exit $retVal

View File

@ -1,99 +0,0 @@
name: E2E-1.20
on:
push:
branches:
- master
- release-*
pull_request: {}
workflow_dispatch: {}
env:
# Common versions
GO_VERSION: '1.18'
KIND_VERSION: 'v0.14.0'
KIND_IMAGE: 'kindest/node:v1.20.7'
KIND_CLUSTER_NAME: 'ci-testing'
jobs:
ephemeraljob:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: ${{ env.GO_VERSION }}
- name: Setup Kind Cluster
uses: helm/kind-action@v1.3.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
exit $retVal

View File

@ -8,28 +8,63 @@ on:
pull_request: {}
workflow_dispatch: {}
# Declare default permissions as read only.
permissions: read-all
env:
# Common versions
GO_VERSION: '1.18'
GO_VERSION: '1.23'
KIND_ACTION_VERSION: 'v1.3.0'
KIND_VERSION: 'v0.14.0'
KIND_IMAGE: 'kindest/node:v1.24.2'
KIND_IMAGE: 'kindest/node:v1.24.6'
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.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-18.04
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
submodules: true
- name: Setup Go
uses: actions/setup-go@v3
uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
with:
go-version: ${{ env.GO_VERSION }}
- name: Setup Kind Cluster
uses: helm/kind-action@v1.3.0
uses: helm/kind-action@a1b0e391336a6ee6713a0583f8c6240d70863de3 # v1.12.0
with:
node_image: ${{ env.KIND_IMAGE }}
cluster_name: ${{ env.KIND_CLUSTER_NAME }}
@ -42,63 +77,58 @@ jobs:
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
IMG=openkruise/kruise-manager:e2e-${GITHUB_RUN_ID} make install-kruise
- 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 "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
exit $retVal
tools/hack/run-kruise-e2e-test.sh --focus 'StatefulSet' --print-info
pullimages-containerrecreate:
runs-on: ubuntu-18.04
cloneset:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
submodules: true
- name: Setup Go
uses: actions/setup-go@v3
uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
with:
go-version: ${{ env.GO_VERSION }}
- name: Setup Kind Cluster
uses: helm/kind-action@v1.3.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.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:
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 }}
@ -111,75 +141,24 @@ jobs:
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
IMG=openkruise/kruise-manager:e2e-${GITHUB_RUN_ID} make install-kruise
- name: Run E2E Tests
run: |
export KUBECONFIG=/home/runner/.kube/config
make ginkgo
set +e
./bin/ginkgo -timeout 60m -v --focus='\[apps\] (PullImage|ContainerRecreateRequest)' 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
exit $retVal
tools/hack/run-kruise-e2e-test.sh --focus '(PullImage|ContainerRecreateRequest|PullImages|ResourceDistribution|PersistentPodState|PodProbeMarker)' --print-info
advanced-daemonset:
runs-on: ubuntu-18.04
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
submodules: true
- name: Setup Go
uses: actions/setup-go@v3
uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
with:
go-version: ${{ env.GO_VERSION }}
- name: Setup Kind Cluster
uses: helm/kind-action@v1.3.0
uses: helm/kind-action@a1b0e391336a6ee6713a0583f8c6240d70863de3 # v1.12.0
with:
node_image: ${{ env.KIND_IMAGE }}
cluster_name: ${{ env.KIND_CLUSTER_NAME }}
@ -192,75 +171,24 @@ jobs:
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
IMG=openkruise/kruise-manager:e2e-${GITHUB_RUN_ID} make install-kruise
- 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
exit $retVal
tools/hack/run-kruise-e2e-test.sh --focus 'DaemonSet' --print-info
sidecarset:
runs-on: ubuntu-18.04
sidecar:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
submodules: true
- name: Setup Go
uses: actions/setup-go@v3
uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
with:
go-version: ${{ env.GO_VERSION }}
- name: Setup Kind Cluster
uses: helm/kind-action@v1.3.0
uses: helm/kind-action@a1b0e391336a6ee6713a0583f8c6240d70863de3 # v1.12.0
with:
node_image: ${{ env.KIND_IMAGE }}
cluster_name: ${{ env.KIND_CLUSTER_NAME }}
@ -273,75 +201,24 @@ jobs:
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
IMG=openkruise/kruise-manager:e2e-${GITHUB_RUN_ID} make install-kruise
- 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
exit $retVal
tools/hack/run-kruise-e2e-test.sh --focus 'SidecarSet|SidecarTerminator|ContainerPriority' --print-info
ephemeraljob:
runs-on: ubuntu-18.04
job-workload:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
submodules: true
- name: Setup Go
uses: actions/setup-go@v3
uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
with:
go-version: ${{ env.GO_VERSION }}
- name: Setup Kind Cluster
uses: helm/kind-action@v1.3.0
uses: helm/kind-action@a1b0e391336a6ee6713a0583f8c6240d70863de3 # v1.12.0
with:
node_image: ${{ env.KIND_IMAGE }}
cluster_name: ${{ env.KIND_CLUSTER_NAME }}
@ -354,110 +231,25 @@ jobs:
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
IMG=openkruise/kruise-manager:e2e-${GITHUB_RUN_ID} make install-kruise
- 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
tools/hack/run-kruise-e2e-test.sh --focus '(EphemeralJob|BroadcastJob)' --print-info
podUnavailableBudget:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: ${{ env.GO_VERSION }}
- name: Setup Kind Cluster
uses: helm/kind-action@v1.3.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
other:
runs-on: ubuntu-18.04
policy:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
submodules: true
- name: Setup Go
uses: actions/setup-go@v3
uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
with:
go-version: ${{ env.GO_VERSION }}
- name: Setup Kind Cluster
uses: helm/kind-action@v1.3.0
uses: helm/kind-action@a1b0e391336a6ee6713a0583f8c6240d70863de3 # v1.12.0
with:
node_image: ${{ env.KIND_IMAGE }}
cluster_name: ${{ env.KIND_CLUSTER_NAME }}
@ -470,59 +262,37 @@ jobs:
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
IMG=openkruise/kruise-manager:e2e-${GITHUB_RUN_ID} make install-kruise
- name: Run E2E Tests
run: |
export KUBECONFIG=/home/runner/.kube/config
make ginkgo
set +e
./bin/ginkgo -timeout 90m -v --skip='\[apps\] (StatefulSet|PullImage|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
exit $retVal
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

295
.github/workflows/e2e-1.26.yaml vendored Normal file
View File

@ -0,0 +1,295 @@
name: E2E-1.26
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.18.0'
KIND_IMAGE: 'kindest/node:v1.26.3'
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.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.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
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.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:
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 '(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.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.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.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.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

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

@ -0,0 +1,298 @@
name: E2E-1.28
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.28.7'
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: |
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 '(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

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

@ -0,0 +1,298 @@
name: E2E-1.30
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.30.8'
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

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

@ -10,14 +10,17 @@ on:
- master
- release-*
# Declare default permissions as read only.
permissions: read-all
jobs:
license_check:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
name: Check for unapproved licenses
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Set up Ruby
uses: ruby/setup-ruby@v1
uses: ruby/setup-ruby@efbf473cab83af4468e8606cc33eca9281bb213f # v1.256.0
with:
ruby-version: 2.6
- name: Install dependencies

72
.github/workflows/scorecard.yml vendored Normal file
View File

@ -0,0 +1,72 @@
# This workflow uses actions that are not certified by GitHub. They are provided
# by a third-party and are governed by separate terms of service, privacy
# policy, and support documentation.
name: Scorecard supply-chain security
on:
# For Branch-Protection check. Only the default branch is supported. See
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection
branch_protection_rule:
# To guarantee Maintained check is occasionally updated. See
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained
schedule:
- cron: '30 14 * * *'
push:
branches: [ "master" ]
# Declare default permissions as read only.
permissions: read-all
jobs:
analysis:
name: Scorecard analysis
runs-on: ubuntu-latest
permissions:
# Needed to upload the results to code-scanning dashboard.
security-events: write
# Needed to publish results and get a badge (see publish_results below).
id-token: write
# Uncomment the permissions below if installing in a private repository.
# contents: read
# actions: read
steps:
- name: "Checkout code"
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
- name: "Run analysis"
uses: ossf/scorecard-action@05b42c624433fc40578a4040d5cf5e36ddca8cde # v2.4.2
with:
results_file: results.sarif
results_format: sarif
# (Optional) "write" PAT token. Uncomment the `repo_token` line below if:
# - you want to enable the Branch-Protection check on a *public* repository, or
# - you are installing Scorecard on a *private* repository
# To create the PAT, follow the steps in https://github.com/ossf/scorecard-action#authentication-with-pat.
# repo_token: ${{ secrets.SCORECARD_TOKEN }}
# Public repositories:
# - Publish results to OpenSSF REST API for easy access by consumers
# - Allows the repository to include the Scorecard badge.
# - See https://github.com/ossf/scorecard-action#publishing-results.
# For private repositories:
# - `publish_results` will always be set to `false`, regardless
# of the value entered here.
publish_results: true
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
# format to the repository Actions tab.
- name: "Upload artifact"
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
with:
name: SARIF file
path: results.sarif
retention-days: 5
# Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@df559355d593797519d70b90fc8edd5db049e7a2 # v2.25.0
with:
sarif_file: results.sarif

2
.gitignore vendored
View File

@ -28,3 +28,5 @@ test/e2e/generated/bindata.go
.vscode
.DS_Store
vendor/

View File

@ -1,86 +1,73 @@
# options for analysis running
version: "2"
run:
# default concurrency is a available CPU number
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
# include test files or not, default is 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:
# colored-line-number|line-number|json|tab|checkstyle, default is "colored-line-number"
format: colored-line-number
# print lines of code with issue, default is 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
formats:
text:
path: stdout
colors: true
linters:
fast: false
disable-all: true
default: none
enable:
# TODO Enforce the below linters later
- gofmt
- depguard
- govet
- goimports
- ineffassign
- misspell
- vet
- unconvert
- unused
issues:
exclude:
# staticcheck
- 'SA1019: package github.com/golang/protobuf/proto is deprecated: Use the "google.golang.org/protobuf/proto" package instead'
settings:
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: 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,350 @@
# 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
> Change log since v1.7.2
### Bug fixes
- Fix kubeflow PyTorchJob create pod failure due to pod webhook. ([#1734](https://github.com/openkruise/kruise/pull/1864), [@zmberg](https://github.com/zmberg))
## v1.7.2
> Change log since v1.7.1
### 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))
## v1.6.4
> Change log since v1.6.3
### 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))
## v1.5.5
> Chang log since v1.5.4
### 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))
- Advanced StatefulSet maxUnavailable now counts unavailable pods with smaller ordinal in the update order during rolling upgrade. ([#1480](https://github.com/openkruise/kruise/pull/1480), [@Yesphet](https://github.com/Yesphet))
## v1.7.1
> Change log since v1.7.0
### Bug fixes
- When update crd webhook caBundle, if caBundle does not change, do not update crd again. ([#1717](https://github.com/openkruise/kruise/pull/1717), [@zmberg](https://github.com/zmberg))
- Remove normal init container in pod's sidecarSet in-place update annotation. ([#1719](https://github.com/openkruise/kruise/pull/1719), [@zmberg](https://github.com/zmberg))
## v1.7.0
> Change log since v1.6.3
### Key Features
- 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))
- 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))
- 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))
- 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))
- Kruise-daemon support cri-docker.sock for kubernetes clusters that use docker runtime. ([#1631](https://github.com/openkruise/kruise/pull/1631), [@BraceCY](https://github.com/BraceCY))
- Advanced StatefulSet add pod index label `statefulset.kubernetes.io/pod-index`. ([#1667](https://github.com/openkruise/kruise/pull/1667), [@cr7258](https://github.com/cr7258))
- Add Structured logging support. ([#1565](https://github.com/openkruise/kruise/pull/1565), [@MajLuu](https://github.com/MajLuu)); ([#1629](https://github.com/openkruise/kruise/pull/1629), [@jairuigou](https://github.com/jairuigou)); ([#1669](https://github.com/openkruise/kruise/pull/1669), [@AiRanthem](https://github.com/AiRanthem))
### Performance Enhancement
- Optimizing Pod SidecarSet webhook and controller performance when lots of namespace scoped sidecarSet exists ([#1547](https://github.com/openkruise/kruise/pull/1547), [@ls-2018](https://github.com/ls-2018))
- Pod readiness controller use Patch instead of Update, thus reducing updating conflict when creating a large number of Pods. ([#1560](https://github.com/openkruise/kruise/pull/1560), [@BruceAko](https://github.com/BruceAko))
### Bug fixes
- Multi-domain Management
- Fixes workloadSpread validation message when using adaptive strategy type. ([#1553](https://github.com/openkruise/kruise/pull/1553), [@voron](https://github.com/voron))
- When feature-gate WorkloadSpread=false, the WorkloadSpread Controller is no longer started and the creation of workloadSpread CR is not allowed. ([#1566](https://github.com/openkruise/kruise/pull/1566), [@ls-2018](https://github.com/ls-2018))
- Application Protection
- In some extreme scenarios, fix PodUnavailableBudget blocking KCM recycling Pods. ([#1567](https://github.com/openkruise/kruise/pull/1567), [@Spground](https://github.com/Spground))
- Sidecar Container
- Fix SidecarSet invalid update status. ([#1641](https://github.com/openkruise/kruise/pull/1641), [@Spground](https://github.com/Spground))
- Advanced Workload
- Fix potential nil panic in CloneSet validating webhook when Pod's controller owner ref is nil. ([#1678](https://github.com/openkruise/kruise/pull/1678), [@Spground](https://github.com/Spground))
### Misc (cleanup and Flake)
- Optimized Advanced StatefulSet code structure based on upstream community code(k8s 1.28). ([#1648](https://github.com/openkruise/kruise/pull/1648), [@ABNER-1](https://github.com/ABNER-1))
- Reduce github workflow action permission. ([#1523](https://github.com/openkruise/kruise/pull/1523), [@furykerry](https://github.com/furykerry))
- Bug fix for Makefile envtest failed. ([#1548](https://github.com/openkruise/kruise/pull/1548), [@BH4AWS](https://github.com/BH4AWS))
- Fix UT TestRevisionManage. ([#1555](https://github.com/openkruise/kruise/pull/1555), [@furykerry](https://github.com/furykerry))
- Upgrade opencontainers/runc (1.1.12) and controller-gen (0.14.0). ([#1562](https://github.com/openkruise/kruise/pull/1562), [@ppbits](https://github.com/ppbits))
- Remove vendor directory. ([#1554](https://github.com/openkruise/kruise/pull/1554), [@liangyuanpeng](https://github.com/liangyuanpeng))
- Add dependabot config for auto-update github-actions. ([#1570](https://github.com/openkruise/kruise/pull/1570), [@liangyuanpeng](https://github.com/liangyuanpeng))
- Add permission of security-events write for ghaction golangci-lint. ([#1582](https://github.com/openkruise/kruise/pull/1582), [@liangyuanpeng](https://github.com/liangyuanpeng))
- Fix vendor error while running command make docker-multiarch. ([#1601](https://github.com/openkruise/kruise/pull/1601), [@MichaelRren](https://github.com/MichaelRren))
- Change e2e centos image from 6.7 to 7, then e2e can work on arm node. ([#1623](https://github.com/openkruise/kruise/pull/1623), [@Colvin-Y](https://github.com/Colvin-Y))
- Fix slice declarations that are not initialized with zero length. ([#1628](https://github.com/openkruise/kruise/pull/1628), [@alingse](https://github.com/alingse))
- Fix UT TestMatchRegistryAuths failed. ([#1583](https://github.com/openkruise/kruise/pull/1583), [@ABNER-1](https://github.com/ABNER-1))
- Changes the scorecard badge link from old format to the Standard human-readable OpenSSF Scorecard Report. ([#1657](https://github.com/openkruise/kruise/pull/1657), [@harshitasao](https://github.com/harshitasao))
## v1.6.3
> Change log since v1.6.2
### CVE FIX
- fix potential security issues of dependent packages ([#1586](https://github.com/openkruise/kruise/pull/1586), [ABNER-1](https://github.com/ABNER-1)) ([#1591](https://github.com/openkruise/kruise/pull/1591), [ABNER-1](https://github.com/ABNER-1))
## v1.6.2
> Change log since v1.6.1
### CloneSet
- Fix new version of Pods released by cloneSet that doesn't match spec.updateStrategy.partition. ([#1549](https://github.com/openkruise/kruise/pull/1549), [@qswksp](https://github.com/qswksp))
## v1.5.4
> Chang log since v1.5.3
### CloneSet
- Fix new version of Pods released by cloneSet that doesn't match spec.updateStrategy.partition. ([#1549](https://github.com/openkruise/kruise/pull/1549), [@qswksp](https://github.com/qswksp))
## v1.4.2
> Change log since v1.4.1
### CloneSet
- Fix new version of Pods released by cloneSet that doesn't match spec.updateStrategy.partition. ([#1549](https://github.com/openkruise/kruise/pull/1549), [@qswksp](https://github.com/qswksp))
## v1.6.1
> Change log since v1.6.0
### Upgrade Notice
- FeatureGate PodWebhook=false will not disable ResourcesDeletionProtection. ([#1526](https://github.com/openkruise/kruise/pull/1526), [@zmberg](https://github.com/zmberg))
- Update go.mod require k8s version from 1.29 to 1.26, and remove go mod replace. ([#1527](https://github.com/openkruise/kruise/pull/1527), [KaiShi](https://github.com/BH4AWS))
### Advanced Workload
- Fix when StatefulSet reserveOrdinals exist and whenScaled=Delete, scale down pvc failed. ([#1531](https://github.com/openkruise/kruise/pull/1531), [@zmberg](https://github.com/zmberg))
## v1.5.3
> Chang log since v1.5.2
### Advanced Workload
- Fix when StatefulSet reserveOrdinals exist and whenScaled=Delete, scale down pvc failed. ([#1531](https://github.com/openkruise/kruise/pull/1531), [@zmberg](https://github.com/zmberg))
## v1.6.0
> Change log since v1.5.2
### Upgrade Notice
> No, really, you must read this before you upgrade
- 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")
- 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")
- 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.
- 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,
e.g. SidecarSet, WorkloadSpread, PodUnavailableBudget, ContainerLaunchPriority and PersistentPodState. ([#92](https://github.com/openkruise/charts/pull/92), [@hantmac](https://github.com/hantmac))
### Key Features
- Fix WorkloadSpread incorrect subset allocation after workload rolling updating. ([#1197](https://github.com/openkruise/kruise/pull/1197), [veophi](https://github.com/veophi))
- ImagePullJob support force image pulling for images with the name as previous one. ([#1384](https://github.com/openkruise/kruise/pull/1384), [ls-2018](https://github.com/ls-2018))
- Job Sidecar Terminator reports correct pod phase for sidecar containers with non-zero exit code. ([#1303](https://github.com/openkruise/kruise/pull/1303), [@diannaowa](https://github.com/diannaowa))
- Support the deletion protection of service and ingress resources. ([#1269](https://github.com/openkruise/kruise/pull/1269), [@kevin1689-cloud](https://github.com/kevin1689-cloud))
### Performance Enhancement
- Optimize PodProbeMarker performance. ([#1430](https://github.com/openkruise/kruise/pull/1430), [ls-2018](https://github.com/ls-2018))
- Optimize container launch priority performance. ([#1490](https://github.com/openkruise/kruise/pull/1490), [FillZpp](https://github.com/FillZpp))
### Other Changes
- Enhanced Operation
- PodProbeMarker: Container probe support Tcp probing. ([#1474](https://github.com/openkruise/kruise/pull/1474), [KaiShi](https://github.com/BH4AWS))
- PodProbeMarker: Sync podCondition when probe message of probeStates changed. ([#1479](https://github.com/openkruise/kruise/pull/1479), [chrisliu1995](https://github.com/chrisliu1995))
- PersistentPodState: Fix the problem that PersistentPodState can't get spec.replicas from unstructured object. ([#1462](https://github.com/openkruise/kruise/pull/1462), [0xgj](https://github.com/0xgj))
- Fix PodProbeMarker feature gate dependency . ([#1429](https://github.com/openkruise/kruise/pull/1429), [ls-2018](https://github.com/ls-2018))
- Advanced Workload
- Enforce Advanced DaemonSet spec.selector is immutable. ([#1505](https://github.com/openkruise/kruise/pull/1505), [@hantmac](https://github.com/hantmac))
- Advanced StatefulSet maxUnavailable now counts unavailable pods with smaller ordinal in the update order during rolling upgrade. ([#1480](https://github.com/openkruise/kruise/pull/1480), [@Yesphet](https://github.com/Yesphet))
- Fix EphemeralJob event handler for deleting object. ([#1401](https://github.com/openkruise/kruise/pull/1401), [FillZpp](https://github.com/FillZpp))
- Sidecar Container
- Fix pod annotations injection abnormal for SidecarSet. ([#1453](https://github.com/openkruise/kruise/pull/1453), [@a932846905](https://github.com/a932846905))
- Application Protection
- PodUnavailableBudget ignore deletion of not ready or inconsistent pods. ([#1512](https://github.com/openkruise/kruise/pull/1512), [Spground](https://github.com/Spground))
- Others
- Replace 'github.com/pkg/errors' with the standard Go library 'errors'. ([#1518](https://github.com/openkruise/kruise/pull/1518), [dongjiang1989](https://github.com/dongjiang1989))
- Upgrade minimum docker api version from 1.23 to 1.24. ([#1510](https://github.com/openkruise/kruise/pull/1510), [hantmac](https://github.com/hantmac))
- Add UT in controller_revision_test file. ([#1457](https://github.com/openkruise/kruise/pull/1457), [xiangpingjiang](https://github.com/xiangpingjiang))
- BroadcastJob controller define some parameters as Constant. ([#1414](https://github.com/openkruise/kruise/pull/1414), [lilongfeng0902](https://github.com/lilongfeng0902))
- Kruise-daemon enable pprof. ([#1416](https://github.com/openkruise/kruise/pull/1416), [dsxing](https://github.com/dsxing))
- Remove deprecated 'io/ioutil' pkg. ([#1404](https://github.com/openkruise/kruise/pull/1404), [testwill](https://github.com/testwill))
- Fix unnecessary use of fmt.Sprintf. ([#1403](https://github.com/openkruise/kruise/pull/1403), [testwill](https://github.com/testwill))
## v1.5.2
> Chang log since v1.5.1
### CVE FIX: Enhance kruise-daemon security ([#1482](https://github.com/openkruise/kruise/pull/1482), [veophi](https://github.com/veophi))
### Start kruise-manager as a non-root user
We start kruise-manger with a non-root user to further enhance the security of kruise-manager. ([#1491](https://github.com/openkruise/kruise/pull/1491), [@zmberg](https://github.com/zmberg))
## v1.5.1
> Chang log since v1.5.0
In version 1.5.1, the focus was on enhancing UnitedDeployment and addressing various bug fixes:
- Add the ability to plan the lower and upper bound of capacity to the subsets in UnitedDeployment ([#1428](https://github.com/openkruise/kruise/pull/1428), [@veophi](https://github.com/veophi))
- Fix unexpected job recreation by adding controller-revision-hash label for ImageListPullJob. ([#1441](https://github.com/openkruise/kruise/pull/1428), [@veophi](https://github.com/veophi))
- Add prometheus metrics for pub and deletion protection to enhance observability for pub & deletion protection ([#1398](https://github.com/openkruise/kruise/pull/1398), [@zmberg](https://github.com/zmberg))
- Add enable pprof flag for kruise daemon, now you can disable the pprof of kruise daemon ([#1416](https://github.com/openkruise/kruise/pull/1416), [@chengjoey](https://github.com/chengjoey))
- Fix SidecarSet upgrade exception for UpdateExpectations to solve the problem of updating the image of the sidecar container ([#1435](https://github.com/openkruise/kruise/pull/1435), [@zmberg](https://github.com/zmberg)])
- add audit log for pub and deletion protection to enhance observability for pub & deletion protection ([#1438](https://github.com/openkruise/kruise/pull/1438), [@zmberg](https://github.com/zmberg)])
## v1.5.0
> Change log since v1.4.0
### Upgrade Notice
> No, really, you must read this before you upgrade
- **Disable** following feature-gates by default: PreDownloadImageForInPlaceUpdate([#1244](https://github.com/openkruise/kruise/pull/1224), [@zmberg](https://github.com/zmberg)), ImagePullJobGate([#1357](https://github.com/openkruise/kruise/pull/1357), [@zmberg](https://github.com/zmberg)), DeletionProtectionForCRDCascadingGate([#1365](https://github.com/openkruise/kruise/pull/1365), [@zmberg](https://github.com/zmberg)), and ResourceDistributionGate([#1360](https://github.com/openkruise/kruise/pull/1360/files), [@zmberg](https://github.com/zmberg))
- Bump Kubernetes dependency to 1.24.16, Golang version to 1.19([#1354](https://github.com/openkruise/kruise/pull/1354), [Kuromesi](https://github.com/Kuromesi))
### Key Features: Enhanced Multi-Domain Management
- WorkloadSpread:
- Support any customized workloads that have `scale` sub-resource. ([#1286](https://github.com/openkruise/kruise/pull/1286), [veophi](https://github.com/veophi))
- Add validation for subset patch field. ([#1237](https://github.com/openkruise/kruise/pull/1237), [chengleqi](https://github.com/chengleqi))
- UnitedDeployment:
- Support `scale` sub-resource. ([#1314](https://github.com/openkruise/kruise/pull/1314)), [diannaowa](https://github.com/diannaowa))
- Support `patch` field for each subset. ([#1266](https://github.com/openkruise/kruise/pull/1266), [chengleqi](https://github.com/chengleqi))
- Optimize UnitedDeployment replicas settings. ([#1247](https://github.com/openkruise/kruise/pull/1247), [y-ykcir](https://github.com/y-ykcir))
### ImagePreDownload
- ImageListPullJob:
- Many users have the need for batch pre-download images, and the current approach, i.e., ImagePullJob, has a relatively high threshold for use, We added a new CRD ImageListPullJob to batch pre-download images.
You just write a range of images in one ImageListPullJob CR, its controller will generate corresponding ImagePullJob CR for each image automatically. ([1222](https://github.com/openkruise/kruise/pull/1222), [@diannaowa](https://github.com/diannaowa))
- ImagePullJob:
- Fix the matching logic for the imagePullSecret in ImagePullJob. ([#1241](https://github.com/openkruise/kruise/pull/1241), [#1357](https://github.com/openkruise/kruise/pull/1357))
- Advanced Workload pre-download image support attach metadata in ImagePullJob. ([#1246](https://github.com/openkruise/kruise/pull/1246), [YTGhost](https://github.com/YTGhost))
### Advanced Workload
- SidecarSet:
- Add condition and event for not upgradable pods when updating. ([#1309](https://github.com/openkruise/kruise/pull/1309), [MarkLux](https://github.com/MarkLux))
- Take effect of shareVolumePolicy on initContainers. ([#1229](https://github.com/openkruise/kruise/pull/1229), [y-ykcir](https://github.com/y-ykcir))
- Allow sidecar containers to mount serviceAccountToken type volume. ([#1238](https://github.com/openkruise/kruise/pull/1238), [y-ykcir](https://github.com/y-ykcir))
- SidecarSet updateStrategy support priorityStrategy. ([#1325](https://github.com/openkruise/kruise/pull/1325), [y-ykcir](https://github.com/y-ykcir))
- BroadcastJob:
- Make OnFailure as default restartPolicy. ([#1149](https://github.com/openkruise/kruise/pull/1149), [Shubhamurkade](https://github.com/Shubhamurkade))
- Fix BroadcastJob doesn't make pod on node that has erased taint. ([#1204](https://github.com/openkruise/kruise/pull/1204), [weldonlwz](https://github.com/weldonlwz))
- CloneSet & StatefulSet:
- Regard the pod at preparing update state as update revision when scaling. ([#1290](https://github.com/openkruise/kruise/pull/1290), [veophi](https://github.com/veophi))
- Add `updatedAvailableReplicas` field in status. ([#1317](https://github.com/openkruise/kruise/pull/1317), [nitishchauhan0022](https://github.com/nitishchauhan0022))
### Kruise Daemon
- Connecting to Pouch runtime via CRI interface. ([#1232](https://github.com/openkruise/kruise/pull/1232), [@zmberg](https://github.com/zmberg))
- Compatible with v1 and v1alpha2 CRI API version. ([#1354](https://github.com/openkruise/kruise/pull/1354), [veophi](https://github.com/veophi))
### ResourceProtection
- Reject Namespace deletion when PVCs are included under NS. ([#1228](https://github.com/openkruise/kruise/pull/1228), [kevin1689-cloud](https://github.com/kevin1689-cloud))
And some bugs were fixed by
([#1238](https://github.com/openkruise/kruise/pull/1238), [y-ykcir](https://github.com/y-ykcir)),
([#1335](https://github.com/openkruise/kruise/pull/1335), [ls-2018](https://github.com/ls-2018)),
([#1301](https://github.com/openkruise/kruise/pull/1301), [wangwu50](https://github.com/wangwu50)),
([#1395](https://github.com/openkruise/kruise/pull/1301), [ywdxz](https://github.com/ywdxz)),
([#1304](https://github.com/openkruise/kruise/pull/1304), [kevin1689-cloud](https://github.com/kevin1689-cloud)),
([#1348](https://github.com/openkruise/kruise/pull/1348), [#1343](https://github.com/openkruise/kruise/pull/1343), [Colvin-Y](https://github.com/Colvin-Y)),
thanks!
## v1.4.1
> Change log since v1.4.0
### CVE FIX: Enhance kruise-daemon security ([#1482](https://github.com/openkruise/kruise/pull/1482), [veophi](https://github.com/veophi))
## v1.4.0
> Change log since v1.3.0
@ -8,8 +353,8 @@
> No, really, you must read this before you upgrade
- Enable following feature-gates by default: PreDownloadImageForInPlaceUpdate, ResourcesDeletionProtection, WorkloadSpread, PodUnavailableBudgetDeleteGate, InPlaceUpdateEnvFromMetadata,
StatefulSetAutoDeletePVC, PodProbeMarkerGate. ([#1214](https://github.com/openkruise/kruise/pull/1214), [@zmberg](https://github.com/zmberg))
- 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))
- 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
@ -50,6 +395,12 @@ For more detail, please refer to its [proposal](https://github.com/openkruise/kr
- Change kruise base image to alpine. ([#1166](https://github.com/openkruise/kruise/pull/1166), [@fengshunli](https://github.com/fengshunli))
- PersistentPodState support custom workload (like statefulSet). ([#1063](https://github.com/openkruise/kruise/pull/1063), [@baxiaoshi](https://github.com/baxiaoshi))
## v1.3.1
> Change log since v1.3.0
### CVE FIX: Enhance kruise-daemon security ([#1482](https://github.com/openkruise/kruise/pull/1482), [veophi](https://github.com/veophi))
## v1.3.0
> Change log since v1.2.0
@ -65,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:
- **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,
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.
@ -612,7 +963,7 @@ spec:
Since v0.7.0:
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.
### A NEW workload controller - AdvancedCronJob
@ -960,4 +1311,4 @@ It provides full features for more efficient, deterministic and controlled deplo
#### Features
- 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
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.
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.
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
- feature request
@ -20,11 +20,11 @@ There are lot of cases when you could open an issue:
- help wanted
- doc incomplete
- test improvement
- any questions on project
- any questions on the project
- and so on
Also we must remind 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.
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 passwords, secret keys, network locations, private business data, and so on.
## 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
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.
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.
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 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:
```bash
cd <project>
git remote add upstream https://github.com/openkruise/<project>.git
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
Update local working directory:
Update the local working directory:
```bash
cd <project>
@ -79,16 +80,16 @@ Make any change on the new-branch then build and test your codes.
### PR Description
PR is the only way to make change to Kruise project files.
To help reviewers better get your purpose, PR description could not be too detailed.
PR is the only way to make changes to Kruise project files.
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.
### 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.
Here are some dependents with specific version:
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 dependencies with specific versions:
- Golang : v1.18+
- Golang : v1.22+
- Kubernetes: v1.16+
### Developing guide
@ -106,23 +107,40 @@ make build
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
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 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:
```
versions
- kruise-game
- kruise-rollout
- kruise-state-metrics
- kruise
- 1.5.0
- 1.5.1
- 1.6.0
- 1.6.1
```
**make generate_helm_crds** automatically generates crds files under the bin/ directory, which in turn simplifies the generation of helm charts.
## Engage to help anything
We choose GitHub as the primary place for Openkruise to collaborate.
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;
- help solve other user's problems;
- help review other's PR design;
- 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;
- write blogs on Openkruise and so on.
@ -130,5 +148,5 @@ In a word, **ANY HELP IS CONTRIBUTION**.
## 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).

View File

@ -1,8 +1,7 @@
# Build the manager and daemon binaries
ARG BASE_IMAGE=alpine
ARG BASE_IMAGE_VERSION=3.17
FROM golang:1.18-alpine3.17 as builder
ARG BASE_IMAGE_VERSION=3.21@sha256:56fa17d2a7e7f168a043a2712e63aed1f8543aeafdcee47c58dcffe38ed51099
FROM golang:1.23.9-alpine3.21@sha256:fb7ea5cd19bc4eea3eb0d1972919ec0f6229b138985ce4b35ce5846c6bc02973 AS builder
WORKDIR /workspace
# Copy the Go Modules manifests
COPY go.mod go.mod
@ -13,20 +12,37 @@ COPY main.go main.go
COPY apis/ apis/
COPY cmd/ cmd/
COPY pkg/ pkg/
COPY vendor/ vendor/
# Build
RUN CGO_ENABLED=0 GO111MODULE=on go build -mod=vendor -a -o manager main.go \
&& CGO_ENABLED=0 GO111MODULE=on go build -mod=vendor -a -o daemon ./cmd/daemon/main.go
RUN CGO_ENABLED=0 GO111MODULE=on go build -a -o manager main.go \
&& CGO_ENABLED=0 GO111MODULE=on go build -a -o daemon ./cmd/daemon/main.go
ARG BASE_IMAGE
ARG BASE_IMAGE_VERSION
FROM ${BASE_IMAGE}:${BASE_IMAGE_VERSION}
RUN apk add --no-cache ca-certificates=~20220614-r4 bash=~5.2.15-r0 expat=~2.5.0-r0 \
&& rm -rf /var/cache/apk/*
WORKDIR /
COPY --from=builder /workspace/manager .
COPY --from=builder /workspace/daemon ./kruise-daemon
RUN set -eux; \
mkdir -p /log /tmp && \
chown -R nobody:nobody /log && \
chown -R nobody:nobody /tmp && \
chown -R nobody:nobody /manager && \
apk --no-cache --update upgrade && \
apk --no-cache add ca-certificates && \
apk --no-cache add tzdata && \
rm -rf /var/cache/apk/* && \
update-ca-certificates && \
echo "only include root and nobody user" && \
echo -e "root:x:0:0:root:/root:/bin/ash\nnobody:x:65534:65534:nobody:/:/sbin/nologin" | tee /etc/passwd && \
echo -e "root:x:0:root\nnobody:x:65534:" | tee /etc/group && \
rm -rf /usr/local/sbin/* && \
rm -rf /usr/local/bin/* && \
rm -rf /usr/sbin/* && \
rm -rf /usr/bin/* && \
rm -rf /sbin/* && \
rm -rf /bin/*
ENTRYPOINT ["/manager"]

40
Dockerfile_helm_hook Normal file
View File

@ -0,0 +1,40 @@
ARG BASE_IMAGE=alpine
ARG BASE_IMAGE_VERSION=3.19
FROM golang:1.20.14-alpine3.19 AS builder
WORKDIR /workspace
# Copy the Go Modules manifests
COPY go.mod go.mod
COPY go.sum go.sum
# Copy the go source
COPY apis/ apis/
COPY cmd/ cmd/
COPY pkg/ pkg/
# Build
RUN --mount=type=cache,target=/go CGO_ENABLED=0 GO111MODULE=on go build -a -o helm_hook ./cmd/helm_hook/main.go
FROM ${BASE_IMAGE}:${BASE_IMAGE_VERSION}
WORKDIR /
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
RUN set -eux; \
mkdir -p /log /tmp && \
chown -R nobody:nobody /log && \
chown -R nobody:nobody /tmp && \
apk --no-cache --update upgrade && \
apk --no-cache add ca-certificates && \
apk --no-cache add tzdata && \
rm -rf /var/cache/apk/* && \
update-ca-certificates && \
echo "only include root and nobody user" && \
echo -e "root:x:0:0:root:/root:/bin/ash\nnobody:x:65534:65534:nobody:/:/sbin/nologin" | tee /etc/passwd && \
echo -e "root:x:0:root\nnobody:x:65534:" | tee /etc/group
COPY --from=builder /workspace/helm_hook .
RUN chown -R nobody:nobody /helm_hook && \
rm -rf /usr/local/sbin/* && \
rm -rf /usr/local/bin/* && \
rm -rf /usr/sbin/* && \
rm -rf /usr/bin/* && \
rm -rf /sbin/* && \
rm -rf /bin/*
ENTRYPOINT ["/helm_hook"]

View File

@ -1,7 +1,8 @@
# Build the manager and daemon binaries
ARG BASE_IMAGE=alpine
ARG BASE_IMAGE_VERSION=3.17
FROM --platform=$BUILDPLATFORM golang:1.18-alpine3.17 as builder
ARG BASE_IMAGE_VERSION=3.21@sha256:56fa17d2a7e7f168a043a2712e63aed1f8543aeafdcee47c58dcffe38ed51099
ARG BUILD_BASE_IMAGE=golang:1.22.11-alpine3.21@sha256:161858498a61ce093c8e2bd704299bfb23e5bff79aef99b6c40bb9c6a43acf0f
FROM --platform=$BUILDPLATFORM ${BUILD_BASE_IMAGE} AS builder
WORKDIR /workspace
# Copy the Go Modules manifests
@ -13,23 +14,43 @@ COPY main.go main.go
COPY apis/ apis/
COPY cmd/ cmd/
COPY pkg/ pkg/
COPY vendor/ vendor/
#ENV GOPROXY=https://goproxy.cn,direct
RUN go mod tidy
# Build
ARG TARGETOS
ARG TARGETARCH
RUN GOOS=${TARGETOS} GOARCH=${TARGETARCH} CGO_ENABLED=0 GO111MODULE=on go build -mod=vendor -a -o manager main.go \
&& GOOS=${TARGETOS} GOARCH=${TARGETARCH} CGO_ENABLED=0 GO111MODULE=on go build -mod=vendor -a -o daemon ./cmd/daemon/main.go
RUN GOOS=${TARGETOS} GOARCH=${TARGETARCH} CGO_ENABLED=0 GO111MODULE=on go build -a -o manager main.go \
&& GOOS=${TARGETOS} GOARCH=${TARGETARCH} CGO_ENABLED=0 GO111MODULE=on go build -a -o daemon ./cmd/daemon/main.go
ARG BASE_IMAGE
ARG BASE_IMAGE_VERSION
FROM ${BASE_IMAGE}:${BASE_IMAGE_VERSION}
RUN apk add --no-cache ca-certificates=~20220614-r4 bash=~5.2.15-r0 expat=~2.5.0-r0 \
&& rm -rf /var/cache/apk/*
WORKDIR /
COPY --from=builder /workspace/manager .
COPY --from=builder /workspace/daemon ./kruise-daemon
RUN set -eux; \
mkdir -p /log /tmp && \
chown -R nobody:nobody /log && \
chown -R nobody:nobody /tmp && \
chown -R nobody:nobody /manager && \
apk --no-cache --update upgrade && \
apk --no-cache add ca-certificates && \
apk --no-cache add tzdata && \
rm -rf /var/cache/apk/* && \
update-ca-certificates && \
echo "only include root and nobody user" && \
echo -e "root:x:0:0:root:/root:/bin/ash\nnobody:x:65534:65534:nobody:/:/sbin/nologin" | tee /etc/passwd && \
echo -e "root:x:0:root\nnobody:x:65534:" | tee /etc/group && \
rm -rf /usr/local/sbin/* && \
rm -rf /usr/local/bin/* && \
rm -rf /usr/sbin/* && \
rm -rf /usr/bin/* && \
rm -rf /sbin/* && \
rm -rf /bin/*
ENTRYPOINT ["/manager"]

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"]

127
Makefile
View File

@ -1,7 +1,10 @@
# Image URL to use all building/pushing image targets
IMG ?= openkruise/kruise-manager:test
HOOK_IMG ?= openkruise/kruise-helm-hook:test
WIN_DAEMON_IMG ?= openkruise/kruise-daemon-win:test
# Platforms to build the image for
PLATFORMS ?= linux/amd64,linux/arm64,linux/ppc64le
WIN_PLATFORMS ?= windows/amd64
CRD_OPTIONS ?= "crd:crdVersions=v1"
# Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set)
@ -10,6 +13,11 @@ GOBIN=$(shell go env GOPATH)/bin
else
GOBIN=$(shell go env GOBIN)
endif
GOOS ?= $(shell go env GOOS)
# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary.
# Run `setup-envtest list` to list available versions.
ENVTEST_K8S_VERSION ?= 1.32.0
# Setting SHELL to bash allows bash commands to be executed by recipes.
# This is a requirement for 'setup-envtest.sh' in the test target.
@ -22,7 +30,7 @@ all: build
##@ Development
go_check:
@scripts/check_go_version "1.18.0"
@scripts/check_go_version "1.23"
generate: controller-gen ## Generate code containing DeepCopy, DeepCopyInto, and DeepCopyObject method implementations.
@scripts/generate_client.sh
@ -30,7 +38,7 @@ generate: controller-gen ## Generate code containing DeepCopy, DeepCopyInto, and
$(CONTROLLER_GEN) object:headerFile="hack/boilerplate.go.txt" paths="./apis/..."
manifests: controller-gen ## Generate WebhookConfiguration, ClusterRole and CustomResourceDefinition objects.
$(CONTROLLER_GEN) $(CRD_OPTIONS) rbac:roleName=manager-role webhook paths="./..." 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.
go fmt $(shell go list ./... | grep -v /vendor/)
@ -41,16 +49,36 @@ vet: ## Run go vet against code.
lint: golangci-lint ## Run golangci-lint against code.
$(GOLANGCI_LINT) run
ENVTEST_ASSETS_DIR=$(shell pwd)/testbin
test: generate fmt vet manifests ## Run tests
mkdir -p ${ENVTEST_ASSETS_DIR}
source ./scripts/setup-envtest.sh; fetch_envtest_tools $(ENVTEST_ASSETS_DIR); setup_envtest_env $(ENVTEST_ASSETS_DIR); go test ./pkg/... -coverprofile cover.out
test: generate fmt vet manifests envtest ## Run tests
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
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
grep -v "pkg/client" raw-cover.out > cover.out
atest:
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
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
grep -v "pkg/client" raw-cover.out > cover.out
coverage-report: ## Generate cover.html from cover.out
go tool cover -html=cover.out -o cover.html
ifeq ($(GOOS), darwin)
open ./cover.html
else
echo "open cover.html with a HTML viewer."
endif
##@ Build
build: generate fmt vet manifests ## Build manager binary.
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.
go run ./main.go
@ -60,6 +88,9 @@ docker-build: ## Build docker image with the manager.
docker-push: ## Push docker image with the manager.
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.
docker-multiarch:
docker buildx build -f ./Dockerfile_multiarch --pull --no-cache --platform=$(PLATFORMS) --push . -t $(IMG)
@ -75,31 +106,32 @@ uninstall: manifests kustomize ## Uninstall CRDs from the K8s cluster specified
deploy: manifests kustomize ## Deploy controller to the K8s cluster specified in ~/.kube/config.
cd config/manager && $(KUSTOMIZE) edit set image controller=${IMG}
$(KUSTOMIZE) build config/default | kubectl apply -f -
echo -e "resources:\n- manager.yaml" > config/manager/kustomization.yaml
$(KUSTOMIZE) build config/daemonconfig | kubectl apply -f -
undeploy: ## Undeploy controller from the K8s cluster specified in ~/.kube/config.
$(KUSTOMIZE) build config/default | kubectl delete -f -
$(KUSTOMIZE) build config/daemonconfig | kubectl delete -f -
CONTROLLER_GEN = $(shell pwd)/bin/controller-gen
controller-gen: ## Download controller-gen locally if necessary.
ifeq ("$(shell $(CONTROLLER_GEN) --version 2> /dev/null)", "Version: v0.7.0")
# controller-gen@v0.16.5 comply with k8s.io/api v0.30.x
ifeq ("$(shell $(CONTROLLER_GEN) --version 2> /dev/null)", "Version: v0.16.5")
else
rm -rf $(CONTROLLER_GEN)
$(call go-get-tool,$(CONTROLLER_GEN),sigs.k8s.io/controller-tools/cmd/controller-gen@v0.7.0)
$(call go-get-tool,$(CONTROLLER_GEN),sigs.k8s.io/controller-tools/cmd/controller-gen@v0.17.3)
endif
KUSTOMIZE = $(shell pwd)/bin/kustomize
kustomize: ## Download kustomize locally if necessary.
$(call go-get-tool,$(KUSTOMIZE),sigs.k8s.io/kustomize/kustomize/v4@v4.5.5)
GOLANGCI_LINT = $(shell pwd)/bin/golangci-lint
golangci-lint: ## Download golangci-lint locally if necessary.
$(call go-get-tool,$(GOLANGCI_LINT),github.com/golangci/golangci-lint/cmd/golangci-lint@v1.42.1)
$(call go-get-tool,$(GOLANGCI_LINT),github.com/golangci/golangci-lint/cmd/golangci-lint@v1.51.2)
GINKGO = $(shell pwd)/bin/ginkgo
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.
PROJECT_DIR := $(shell dirname $(abspath $(lastword $(MAKEFILE_LIST))))
@ -109,8 +141,75 @@ set -e ;\
TMP_DIR=$$(mktemp -d) ;\
cd $$TMP_DIR ;\
go mod init tmp ;\
echo "Downloading $(2)" ;\
echo "Downloading $(2) to $(PROJECT_DIR)/bin" ;\
GOBIN=$(PROJECT_DIR)/bin go install $(2) ;\
rm -rf $$TMP_DIR ;\
}
endef
include tools/tools.mk
## Location to install dependencies to
TESTBIN ?= $(shell pwd)/testbin
$(TESTBIN):
mkdir -p $(TESTBIN)
ENVTEST ?= $(TESTBIN)/setup-envtest
.PHONY: envtest
envtest: $(TESTBIN) ## Download/update envtest-setup to latest version.
GOBIN=$(TESTBIN) go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest
# create-cluster creates a kube cluster with kind.
.PHONY: create-cluster
create-cluster: $(tools/kind)
tools/hack/create-cluster.sh
DISABLE_CSI ?= false
.PHONY: install-csi
install-csi:
ifeq ($(DISABLE_CSI), true)
@echo "CSI is disabled, skip"
else
cd tools/hack/csi-driver-host-path; ./install-snapshot.sh
endif
# delete-cluster deletes a kube cluster.
.PHONY: delete-cluster
delete-cluster: $(tools/kind) ## Delete kind cluster.
$(tools/kind) delete cluster --name ci-testing
# kube-load-image loads a local built docker image into kube cluster.
.PHONY: kube-load-image
kube-load-image: $(tools/kind)
tools/hack/kind-load-image.sh $(IMG)
# install-kruise install kruise with local build image to kube cluster.
.PHONY: install-kruise
install-kruise:
kubectl create namespace kruise-system;
ifeq ($(ENABLE_E2E_CONFIG), true)
@echo "Applying e2e config...";
kubectl apply -f test/kruise-e2e-config.yaml;
else
@echo "Skipping e2e config application...";
endif
tools/hack/install-kruise.sh $(IMG)
# run-kruise-e2e-test starts to run kruise e2e tests.
.PHONY: run-kruise-e2e-test
run-kruise-e2e-test:
@echo -e "\n\033[36mRunning kruise e2e tests...\033[0m"
tools/hack/run-kruise-e2e-test.sh
generate_helm_crds:
scripts/generate_helm_crds.sh
# kruise-e2e-test runs kruise e2e tests.
.PHONY: kruise-e2e-test
kruise-e2e-test: $(tools/kind) delete-cluster create-cluster install-csi docker-build kube-load-image install-kruise run-kruise-e2e-test delete-cluster
.PHONY: docker-build-hook
docker-build-hook:
docker buildx build -f ./Dockerfile_helm_hook --pull --no-cache --platform=$(PLATFORMS) --push . -t $(HOOK_IMG)

2
OWNERS
View File

@ -4,8 +4,10 @@ approvers:
- FillZpp
- furykerry
- zmberg
- veophi
reviewers:
- Fei-Guo
- FillZpp
- furykerry
- zmberg
- veophi

View File

@ -35,6 +35,7 @@ OpenKruise (官网: [https://openkruise.io](https://openkruise.io)) 是CNCF([Clo
- [**SidecarSet** - 定义和升级你的 sidecar 容器](https://openkruise.io/zh/docs/user-manuals/sidecarset)
- [**Container Launch Priority** 控制sidecar启动顺序](https://openkruise.io/zh/docs/user-manuals/containerlaunchpriority)
- [**Sidecar Job Terminator** 当 Job 类 Pod 主容器退出后Terminator Sidecar容器](https://openkruise.io/zh/docs/user-manuals/jobsidecarterminator)
- **多区域管理**
@ -49,6 +50,9 @@ OpenKruise (官网: [https://openkruise.io](https://openkruise.io)) 是CNCF([Clo
- [原地重启 pod 中的容器](https://openkruise.io/zh/docs/user-manuals/containerrecreaterequest)
- [指定的一批节点上拉取镜像](https://openkruise.io/zh/docs/user-manuals/imagepulljob)
- [**ResourceDistribution** 支持 Secret、Configmaps 资源跨 Namespace 分发](https://openkruise.io/zh/docs/user-manuals/resourcedistribution)
- [**PersistentPodState** 保持Pod的一些状态比如"固定IP调度"](https://openkruise.io/zh/docs/user-manuals/persistentpodstate)
- [**PodProbeMarker** 提供自定义Probe探测的能力](https://openkruise.io/zh/docs/user-manuals/podprobemarker)
- **应用安全防护**
@ -62,6 +66,14 @@ OpenKruise (官网: [https://openkruise.io](https://openkruise.io)) 是CNCF([Clo
- 安装/升级 Kruise [稳定版本](https://openkruise.io/docs/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)
@ -73,7 +85,8 @@ OpenKruise (官网: [https://openkruise.io](https://openkruise.io)) 是CNCF([Clo
- Spectro Cloud, 艾佳生活, Arkane Systems, 滴普科技, 火花思维
- OPPO, 苏宁, 欢聚时代, 汇量科技, 深圳凤凰木网络有限公司
- 小米, 网易, 美团金融, 虾皮购物, e签宝
- LinkedIn, 雪球, 兴盛优选, Wholee
- LinkedIn, 雪球, 兴盛优选, Wholee, LilithGames, Baidu
- Bilibili, 冠赢互娱, MeiTuan, 同城
## 贡献
@ -87,10 +100,15 @@ OpenKruise (官网: [https://openkruise.io](https://openkruise.io)) 是CNCF([Clo
- 钉钉搜索群ID `23330762` (*Chinese*)
- 微信:添加用户 `openkruise` 并让机器人拉你入群 (*Chinese*)
- 社区双周会 (APAC, *Chinese*):
- 周四 19:00 GMT+8 (Asia/Shanghai)
- [进入会议(zoom)](https://us02web.zoom.us/j/87059136652?pwd=NlI4UThFWXVRZkxIU0dtR1NINncrQT09)
- 周四 19:30 GMT+8 (Asia/Shanghai)
- 进入会议(钉钉): 搜索群ID `23330762`
- [会议纪要](https://shimo.im/docs/gXqmeQOYBehZ4vqo)
- Bi-weekly Community Meeting (*English*): TODO
- [进入会议(zoom)](https://us02web.zoom.us/j/87059136652?pwd=NlI4UThFWXVRZkxIU0dtR1NINncrQT09)
## 安全
汇报安全漏洞请通过邮箱kubernetes-security@service.aliyun.com, 更多安全细节并参见[SECURITY.md](SECURITY.md)
## License

View File

@ -3,10 +3,11 @@
[![License](https://img.shields.io/badge/license-Apache%202-4EB1BA.svg)](https://www.apache.org/licenses/LICENSE-2.0.html)
[![Go Report Card](https://goreportcard.com/badge/github.com/openkruise/kruise)](https://goreportcard.com/report/github.com/openkruise/kruise)
[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/2908/badge)](https://bestpractices.coreinfrastructure.org/en/projects/2908)
[![Build Status](https://travis-ci.org/openkruise/kruise.svg?branch=master)](https://travis-ci.org/openkruise/kruise)
[![OpenSSF Scorecard](https://api.scorecard.dev/projects/github.com/openkruise/kruise/badge)](https://scorecard.dev/viewer/?uri=github.com/openkruise/kruise)
[![CircleCI](https://circleci.com/gh/openkruise/kruise.svg?style=svg)](https://circleci.com/gh/openkruise/kruise)
[![codecov](https://codecov.io/gh/openkruise/kruise/branch/master/graph/badge.svg)](https://codecov.io/gh/openkruise/kruise)
[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-v2.0%20adopted-ff69b4.svg)](./CODE_OF_CONDUCT.md)
[![Gurubase](https://img.shields.io/badge/Gurubase-Ask%20Kruise%20Guru-006BFF)](https://gurubase.io/g/kruise)
English | [简体中文](./README-zh_CN.md)
@ -31,10 +32,11 @@ It consists of several controllers which extend and complement the [Kubernetes c
- **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)
- [**Container Launch Priority** to control the container startup orders](https://openkruise.io/docs/user-manuals/containerlaunchpriority)
- [**Sidecar Job Terminator** terminates sidecar containers for such job-type Pods when its main containers completed.](https://openkruise.io/docs/user-manuals/jobsidecarterminator)
- **Multi-domain Management**
@ -48,8 +50,11 @@ It consists of several controllers which extend and complement the [Kubernetes c
- **Enhanced Operations**
- [Restart containers in a running pod](https://openkruise.io/docs/user-manuals/containerrecreaterequest)
- [Download images on specific nodes](https://openkruise.io/docs/user-manuals/imagepulljob)
- [**ContainerRecreateRequest** provides a way to let users restart/recreate containers in a running pod](https://openkruise.io/docs/user-manuals/containerrecreaterequest)
- [**ImagePullJob** pre-download images on specific nodes](https://openkruise.io/docs/user-manuals/imagepulljob)
- [**ResourceDistribution** support Secret & ConfigMap resource distribution across namespaces](https://openkruise.io/docs/user-manuals/resourcedistribution)
- [**PersistentPodState** is able to persistent states of the Pod, such as "IP Retention"](https://openkruise.io/docs/user-manuals/persistentpodstate)
- [**PodProbeMarker** provides the ability to customize the Probe and return the result to the Pod](https://openkruise.io/docs/user-manuals/podprobemarker)
- **Application Protection**
@ -63,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 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
Registration: [Who is using Kruise](https://github.com/openkruise/kruise/issues/289)
@ -74,7 +87,8 @@ Registration: [Who is using Kruise](https://github.com/openkruise/kruise/issues/
- Spectro Cloud, ihomefnt, Arkane Systems, Deepexi, 火花思维
- OPPO, Suning.cn, joyy, Mobvista, 深圳凤凰木网络有限公司
- xiaomi, Netease, MeiTuan Finance, Shopee, Esign
- LinkedIn, 雪球, 兴盛优选, Wholee
- LinkedIn, 雪球, 兴盛优选, Wholee, LilithGames, Baidu
- Bilibili, 冠赢互娱, MeiTuan, 同城
## Contributing
@ -88,10 +102,14 @@ Active communication channels:
- DingTalkSearch GroupID `23330762` (*Chinese*)
- WeChat: Search User `openkruise` and let the robot invite you (*Chinese*)
- Bi-weekly Community Meeting (APAC, *Chinese*):
- Thursday 19:00 GMT+8 (Asia/Shanghai), [Calendar](https://calendar.google.com/calendar/u/2?cid=MjdtbDZucXA2bjVpNTFyYTNpazV2dW8ybHNAZ3JvdXAuY2FsZW5kYXIuZ29vZ2xlLmNvbQ)
- [Meeting Link(zoom)](https://us02web.zoom.us/j/87059136652?pwd=NlI4UThFWXVRZkxIU0dtR1NINncrQT09)
- Thursday 19:30 GMT+8 (Asia/Shanghai), [Calendar](https://calendar.google.com/calendar/u/2?cid=MjdtbDZucXA2bjVpNTFyYTNpazV2dW8ybHNAZ3JvdXAuY2FsZW5kYXIuZ29vZ2xlLmNvbQ)
- Join Meeting(DingTalk): Search GroupID `23330762` (*Chinese*)
- [Notes and agenda](https://shimo.im/docs/gXqmeQOYBehZ4vqo)
- Bi-weekly Community Meeting (*English*): TODO
- [Meeting Link(zoom)](https://us02web.zoom.us/j/87059136652?pwd=NlI4UThFWXVRZkxIU0dtR1NINncrQT09)
## Security
Please report vulnerabilities by email to kubernetes-security@service.aliyun.com. Also see our [SECURITY.md](SECURITY.md) file for details.
## License

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.
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

View File

@ -9,9 +9,10 @@ Here's an overview:
| Version | Supported |
| ------- | ------------------- |
| 0.10.x | :white_check_mark: |
| 0.9.x | :white_check_mark: |
| < 0.9 | :x: |
| 1.16.x | :white_check_mark: |
| 1.15.x | :white_check_mark: |
| 1.14.x | :white_check_mark: |
| < 1.14 | :x: |
## Prevention
@ -26,16 +27,9 @@ Kruise maintainers are working to improve our prevention by adding additional me
We strive to ship secure software, but we need the community to help us find security breaches.
In case of a confirmed breach, reporters will get full credit and can be keep in the loop, if
preferred.
In case of a confirmed breach, reporters will get full credit and can be keep in the loop, if preferred.
### Private Disclosure Processes
We ask that all suspected vulnerabilities be privately and responsibly disclosed by [contacting our maintainers](mailto:cncf-openkruise-maintainers@lists.cncf.io).
### Public Disclosure Processes
If you know of a publicly disclosed security vulnerability please IMMEDIATELY email the [OpenKruise maintainers](mailto:cncf-openkruise-maintainers@lists.cncf.io) to inform about the vulnerability so they may start the patch, release, and communication process.
DO NOT CREATE AN ISSUE to report a security problem. Instead, please send an email to kubernetes-security@service.aliyun.com
### Compensation

10
SECURITY_CONTACTS.md Normal file
View File

@ -0,0 +1,10 @@
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](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)
Security Contacts:
* [Zhen Zhang](mailto:shouchen.zz@alibaba-inc.com)
* [Mingshan Zhao](mailto:liheng.zms@alibaba-inc.com)

84
SECURITY_RESPONSE.md Normal file
View File

@ -0,0 +1,84 @@
# Incident response
This serves to define how potential security issues should be triaged, how
confirmation occurs, providing the notification, and issuing a security advisory
as well as patch/release.
## Triage
### Identify the problem
Triaging issues allows maintainers to focus resources on the most critically
impacting problems. Potential security risks should be evaluated against the
following information:
* Which component(s) of the project is impacted?
* What kind of problem is this?
* privilege escalation
* credential access
* code execution
* exfiltration
* lateral movement
* How complex is the problem?
* Is user interaction required?
* What privileges are required for this problem to occur?
* admin
* general
* What is the potential impact or consequence of the problem?
* Does an exploit exist?
Any potential problem that has an exploit, permits privilege escalation, is
simple, and does not require user interaction should be evaluated immediately.
[CVSS Version 3.1](https://nvd.nist.gov/vuln-metrics/cvss/v3-calculator) can be
a helpful tool in evaluating the criticality of reported issues.
### Acknowledge receipt of the problem
Respond to the reporter and notify them that you have received and begun reviewing the problem. Remind them of the [embargo policy](https://github.com/cncf/tag-security/blob/231b87f371274b2d68def2c6a35a719210836191/project-resources/templates/embargo-policy.md), and provide them
information on who to contact/follow-up with if they have questions. Estimate when they can expect to receive an update. Create a calendar reminder to contact them again by that date to provide an update.
### Replicate the problem
Follow the instructions relayed in the problem. If the instructions are
insufficient, contact the reporter and ask for more information.
If the problem cannot be replicated, re-engage the reporter, let them know it
cannot be replicated, and work with them to find a remediation.
If the problem can be replicated, re-evaluate the criticality of the problem, and
begin working on a remediation. Begin a draft security advisory.
Notify the reporter you were able to replicate the problem and have begun working
on a fix. Remind them of the [embargo policy](https://github.com/cncf/tag-security/blob/231b87f371274b2d68def2c6a35a719210836191/project-resources/templates/embargo-policy.md). If necessary, notify them of an
extension (only for very complex problems where remediation cannot be issued
within the project's specified window).
#### Request a CVE number
If a CVE has already been provided, be sure to include it on the advisory. If
one has not yet been created, [GitHub functions as a CVE Numbering Authority](https://docs.github.com/en/code-security/security-advisories/about-github-security-advisories#cve-identification-numbers)
and allows you to request one as part of the security advisory process. Provide
all required information and as much optional information as we can. The CVE
number is shown as reserved with no further details until notified it has been
published.
## Notification
Once the problem has been replicated and a remediation is in place, notify
subscribed parties with a security bulletin (use [this template](https://github.com/cncf/tag-security/blob/231b87f371274b2d68def2c6a35a719210836191/project-resources/templates/embargo.md)) and the expected publishing date.
## Publish and release
Once a CVE number has been assigned, publish and release the updated
version/patch. Be sure to notify the CVE group when published so the CVE details
are searchable. Be sure to give credit to the reporter by *[editing the security
advisory](https://docs.github.com/en/github/managing-security-vulnerabilities/editing-a-security-advisory#about-credits-for-security-advisories)*
as they took the time to notify and work with you on the problem!
### Issue a security advisory
Follow the instructions from [GitHub to publish the security advisory previously
drafted](https://docs.github.com/en/github/managing-security-vulnerabilities/publishing-a-security-advisory).
For more information on security advisories, please refer to the [GitHub
Article](https://docs.github.com/en/code-security/security-advisories/about-github-security-advisories).

View File

@ -47,20 +47,20 @@ func SetDefaultPodSpec(in *corev1.PodSpec) {
v1.SetDefaults_ResourceList(&a.Resources.Requests)
if a.LivenessProbe != nil {
v1.SetDefaults_Probe(a.LivenessProbe)
if a.LivenessProbe.Handler.HTTPGet != nil {
v1.SetDefaults_HTTPGetAction(a.LivenessProbe.Handler.HTTPGet)
if a.LivenessProbe.ProbeHandler.HTTPGet != nil {
v1.SetDefaults_HTTPGetAction(a.LivenessProbe.ProbeHandler.HTTPGet)
}
}
if a.ReadinessProbe != nil {
v1.SetDefaults_Probe(a.ReadinessProbe)
if a.ReadinessProbe.Handler.HTTPGet != nil {
v1.SetDefaults_HTTPGetAction(a.ReadinessProbe.Handler.HTTPGet)
if a.ReadinessProbe.ProbeHandler.HTTPGet != nil {
v1.SetDefaults_HTTPGetAction(a.ReadinessProbe.ProbeHandler.HTTPGet)
}
}
if a.StartupProbe != nil {
v1.SetDefaults_Probe(a.StartupProbe)
if a.StartupProbe.Handler.HTTPGet != nil {
v1.SetDefaults_HTTPGetAction(a.StartupProbe.Handler.HTTPGet)
if a.StartupProbe.ProbeHandler.HTTPGet != nil {
v1.SetDefaults_HTTPGetAction(a.StartupProbe.ProbeHandler.HTTPGet)
}
}
if a.Lifecycle != nil {
@ -101,20 +101,20 @@ func SetDefaultPodSpec(in *corev1.PodSpec) {
v1.SetDefaults_ResourceList(&a.Resources.Requests)
if a.LivenessProbe != nil {
v1.SetDefaults_Probe(a.LivenessProbe)
if a.LivenessProbe.Handler.HTTPGet != nil {
v1.SetDefaults_HTTPGetAction(a.LivenessProbe.Handler.HTTPGet)
if a.LivenessProbe.ProbeHandler.HTTPGet != nil {
v1.SetDefaults_HTTPGetAction(a.LivenessProbe.ProbeHandler.HTTPGet)
}
}
if a.ReadinessProbe != nil {
v1.SetDefaults_Probe(a.ReadinessProbe)
if a.ReadinessProbe.Handler.HTTPGet != nil {
v1.SetDefaults_HTTPGetAction(a.ReadinessProbe.Handler.HTTPGet)
if a.ReadinessProbe.ProbeHandler.HTTPGet != nil {
v1.SetDefaults_HTTPGetAction(a.ReadinessProbe.ProbeHandler.HTTPGet)
}
}
if a.StartupProbe != nil {
v1.SetDefaults_Probe(a.StartupProbe)
if a.StartupProbe.Handler.HTTPGet != nil {
v1.SetDefaults_HTTPGetAction(a.StartupProbe.Handler.HTTPGet)
if a.StartupProbe.ProbeHandler.HTTPGet != nil {
v1.SetDefaults_HTTPGetAction(a.StartupProbe.ProbeHandler.HTTPGet)
}
}
if a.Lifecycle != nil {
@ -150,20 +150,20 @@ func SetDefaultPodSpec(in *corev1.PodSpec) {
v1.SetDefaults_ResourceList(&a.EphemeralContainerCommon.Resources.Requests)
if a.EphemeralContainerCommon.LivenessProbe != nil {
v1.SetDefaults_Probe(a.EphemeralContainerCommon.LivenessProbe)
if a.EphemeralContainerCommon.LivenessProbe.Handler.HTTPGet != nil {
v1.SetDefaults_HTTPGetAction(a.EphemeralContainerCommon.LivenessProbe.Handler.HTTPGet)
if a.EphemeralContainerCommon.LivenessProbe.ProbeHandler.HTTPGet != nil {
v1.SetDefaults_HTTPGetAction(a.EphemeralContainerCommon.LivenessProbe.ProbeHandler.HTTPGet)
}
}
if a.EphemeralContainerCommon.ReadinessProbe != nil {
v1.SetDefaults_Probe(a.EphemeralContainerCommon.ReadinessProbe)
if a.EphemeralContainerCommon.ReadinessProbe.Handler.HTTPGet != nil {
v1.SetDefaults_HTTPGetAction(a.EphemeralContainerCommon.ReadinessProbe.Handler.HTTPGet)
if a.EphemeralContainerCommon.ReadinessProbe.ProbeHandler.HTTPGet != nil {
v1.SetDefaults_HTTPGetAction(a.EphemeralContainerCommon.ReadinessProbe.ProbeHandler.HTTPGet)
}
}
if a.EphemeralContainerCommon.StartupProbe != nil {
v1.SetDefaults_Probe(a.EphemeralContainerCommon.StartupProbe)
if a.EphemeralContainerCommon.StartupProbe.Handler.HTTPGet != nil {
v1.SetDefaults_HTTPGetAction(a.EphemeralContainerCommon.StartupProbe.Handler.HTTPGet)
if a.EphemeralContainerCommon.StartupProbe.ProbeHandler.HTTPGet != nil {
v1.SetDefaults_HTTPGetAction(a.EphemeralContainerCommon.StartupProbe.ProbeHandler.HTTPGet)
}
}
if a.EphemeralContainerCommon.Lifecycle != nil {
@ -192,12 +192,6 @@ func SetDefaultPodVolumes(volumes []corev1.Volume) {
if a.VolumeSource.Secret != nil {
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 {
v1.SetDefaults_DownwardAPIVolumeSource(a.VolumeSource.DownwardAPI)
for j := range a.VolumeSource.DownwardAPI.Items {
@ -210,9 +204,6 @@ func SetDefaultPodVolumes(volumes []corev1.Volume) {
if a.VolumeSource.ConfigMap != nil {
v1.SetDefaults_ConfigMapVolumeSource(a.VolumeSource.ConfigMap)
}
if a.VolumeSource.AzureDisk != nil {
v1.SetDefaults_AzureDiskVolumeSource(a.VolumeSource.AzureDisk)
}
if a.VolumeSource.Projected != nil {
v1.SetDefaults_ProjectedVolumeSource(a.VolumeSource.Projected)
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,13 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/util/intstr"
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"
)
const (
// ProtectionFinalizer is designed to ensure the GC of resources.
ProtectionFinalizer = "apps.kruise.io/deletion-protection"
)
// SetDefaults_SidecarSet set default values for SidecarSet.
@ -31,11 +37,11 @@ func SetDefaultsSidecarSet(obj *v1alpha1.SidecarSet) {
setSidecarSetUpdateStrategy(&obj.Spec.UpdateStrategy)
for i := range obj.Spec.InitContainers {
setSidecarDefaultContainer(&obj.Spec.InitContainers[i])
setDefaultSidecarContainer(&obj.Spec.InitContainers[i], v1alpha1.AfterAppContainerType)
}
for i := range obj.Spec.Containers {
setDefaultSidecarContainer(&obj.Spec.Containers[i])
setDefaultSidecarContainer(&obj.Spec.Containers[i], v1alpha1.BeforeAppContainerType)
}
//default setting volumes
@ -64,13 +70,13 @@ func SetDefaultInjectRevision(strategy *v1alpha1.SidecarSetInjectionStrategy) {
func SetDefaultRevisionHistoryLimit(revisionHistoryLimit **int32) {
if *revisionHistoryLimit == nil {
*revisionHistoryLimit = utilpointer.Int32Ptr(10)
*revisionHistoryLimit = ptr.To(int32(10))
}
}
func setDefaultSidecarContainer(sidecarContainer *v1alpha1.SidecarContainer) {
func setDefaultSidecarContainer(sidecarContainer *v1alpha1.SidecarContainer, injectPolicy v1alpha1.PodInjectPolicyType) {
if sidecarContainer.PodInjectPolicy == "" {
sidecarContainer.PodInjectPolicy = v1alpha1.BeforeAppContainerType
sidecarContainer.PodInjectPolicy = injectPolicy
}
if sidecarContainer.UpgradeStrategy.UpgradeType == "" {
sidecarContainer.UpgradeStrategy.UpgradeType = v1alpha1.SidecarContainerColdUpgrade
@ -79,7 +85,7 @@ func setDefaultSidecarContainer(sidecarContainer *v1alpha1.SidecarContainer) {
sidecarContainer.ShareVolumePolicy.Type = v1alpha1.ShareVolumePolicyDisabled
}
setSidecarDefaultContainer(sidecarContainer)
setDefaultContainer(sidecarContainer)
}
func setSidecarSetUpdateStrategy(strategy *v1alpha1.SidecarSetUpdateStrategy) {
@ -96,7 +102,7 @@ func setSidecarSetUpdateStrategy(strategy *v1alpha1.SidecarSetUpdateStrategy) {
}
}
func setSidecarDefaultContainer(sidecarContainer *v1alpha1.SidecarContainer) {
func setDefaultContainer(sidecarContainer *v1alpha1.SidecarContainer) {
container := &sidecarContainer.Container
v1.SetDefaults_Container(container)
for i := range container.Ports {
@ -123,14 +129,14 @@ func setSidecarDefaultContainer(sidecarContainer *v1alpha1.SidecarContainer) {
v1.SetDefaults_ResourceList(&container.Resources.Requests)
if container.LivenessProbe != nil {
v1.SetDefaults_Probe(container.LivenessProbe)
if container.LivenessProbe.Handler.HTTPGet != nil {
v1.SetDefaults_HTTPGetAction(container.LivenessProbe.Handler.HTTPGet)
if container.LivenessProbe.ProbeHandler.HTTPGet != nil {
v1.SetDefaults_HTTPGetAction(container.LivenessProbe.ProbeHandler.HTTPGet)
}
}
if container.ReadinessProbe != nil {
v1.SetDefaults_Probe(container.ReadinessProbe)
if container.ReadinessProbe.Handler.HTTPGet != nil {
v1.SetDefaults_HTTPGetAction(container.ReadinessProbe.Handler.HTTPGet)
if container.ReadinessProbe.ProbeHandler.HTTPGet != nil {
v1.SetDefaults_HTTPGetAction(container.ReadinessProbe.ProbeHandler.HTTPGet)
}
}
if container.Lifecycle != nil {
@ -192,15 +198,17 @@ func SetDefaultsBroadcastJob(obj *v1alpha1.BroadcastJob, injectTemplateDefaults
if obj.Spec.FailurePolicy.Type == "" {
obj.Spec.FailurePolicy.Type = v1alpha1.FailurePolicyTypeFailFast
}
// Default to 'OnFailure' if no restartPolicy is specified
if obj.Spec.Template.Spec.RestartPolicy == "" {
obj.Spec.Template.Spec.RestartPolicy = corev1.RestartPolicyOnFailure
}
}
// SetDefaults_UnitedDeployment set default values for UnitedDeployment.
func SetDefaultsUnitedDeployment(obj *v1alpha1.UnitedDeployment, injectTemplateDefaults bool) {
if obj.Spec.Replicas == nil {
obj.Spec.Replicas = utilpointer.Int32Ptr(1)
}
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 {
@ -223,15 +231,34 @@ func SetDefaultsUnitedDeployment(obj *v1alpha1.UnitedDeployment, injectTemplateD
}
}
}
hasReplicasSettings := false
hasCapacitySettings := false
for _, subset := range obj.Spec.Topology.Subsets {
if subset.Replicas != nil {
hasReplicasSettings = true
}
if subset.MinReplicas != nil || subset.MaxReplicas != nil {
hasCapacitySettings = true
}
}
if hasCapacitySettings && !hasReplicasSettings {
for i := range obj.Spec.Topology.Subsets {
subset := &obj.Spec.Topology.Subsets[i]
if subset.MinReplicas == nil {
subset.MinReplicas = &intstr.IntOrString{Type: intstr.Int, IntVal: 0}
}
}
}
}
// SetDefaults_CloneSet set default values for CloneSet.
func SetDefaultsCloneSet(obj *v1alpha1.CloneSet, injectTemplateDefaults bool) {
if obj.Spec.Replicas == nil {
obj.Spec.Replicas = utilpointer.Int32Ptr(1)
obj.Spec.Replicas = ptr.To(int32(1))
}
if obj.Spec.RevisionHistoryLimit == nil {
obj.Spec.RevisionHistoryLimit = utilpointer.Int32Ptr(10)
obj.Spec.RevisionHistoryLimit = ptr.To(int32(10))
}
if injectTemplateDefaults {
@ -343,15 +370,15 @@ func SetDefaultsNodeImage(obj *v1alpha1.NodeImage) {
func SetDefaultsImageTagPullPolicy(obj *v1alpha1.ImageTagPullPolicy) {
if obj.TimeoutSeconds == nil {
obj.TimeoutSeconds = utilpointer.Int32Ptr(600)
obj.TimeoutSeconds = ptr.To(int32(600))
}
if obj.BackoffLimit == nil {
obj.BackoffLimit = utilpointer.Int32Ptr(3)
obj.BackoffLimit = ptr.To(int32(3))
}
}
// SetDefaults_ImagePullJob set default values for ImagePullJob.
func SetDefaultsImagePullJob(obj *v1alpha1.ImagePullJob) {
func SetDefaultsImagePullJob(obj *v1alpha1.ImagePullJob, addProtection bool) {
if obj.Spec.CompletionPolicy.Type == "" {
obj.Spec.CompletionPolicy.Type = v1alpha1.Always
}
@ -359,9 +386,31 @@ func SetDefaultsImagePullJob(obj *v1alpha1.ImagePullJob) {
obj.Spec.PullPolicy = &v1alpha1.PullPolicy{}
}
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 {
obj.Spec.PullPolicy.BackoffLimit = utilpointer.Int32Ptr(3)
obj.Spec.PullPolicy.BackoffLimit = ptr.To(int32(3))
}
if obj.Spec.ImagePullPolicy == "" {
obj.Spec.ImagePullPolicy = v1alpha1.PullIfNotPresent
}
if addProtection {
controllerutil.AddFinalizer(obj, ProtectionFinalizer)
}
}
// SetDefaultsImageListPullJob set default values for ImageListPullJob.
func SetDefaultsImageListPullJob(obj *v1alpha1.ImageListPullJob) {
if obj.Spec.CompletionPolicy.Type == "" {
obj.Spec.CompletionPolicy.Type = v1alpha1.Always
}
if obj.Spec.PullPolicy == nil {
obj.Spec.PullPolicy = &v1alpha1.PullPolicy{}
}
if obj.Spec.PullPolicy.TimeoutSeconds == nil {
obj.Spec.PullPolicy.TimeoutSeconds = ptr.To(int32(600))
}
if obj.Spec.PullPolicy.BackoffLimit == nil {
obj.Spec.PullPolicy.BackoffLimit = ptr.To(int32(3))
}
}

View File

@ -17,13 +17,14 @@ limitations under the License.
package defaults
import (
"github.com/openkruise/kruise/apis/apps/v1beta1"
"github.com/openkruise/kruise/pkg/features"
utilfeature "github.com/openkruise/kruise/pkg/util/feature"
appsv1 "k8s.io/api/apps/v1"
"k8s.io/apimachinery/pkg/util/intstr"
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/pkg/features"
utilfeature "github.com/openkruise/kruise/pkg/util/feature"
)
// SetDefaultsStatefulSet set default values for StatefulSet.
@ -42,7 +43,7 @@ func SetDefaultsStatefulSet(obj *v1beta1.StatefulSet, injectTemplateDefaults boo
obj.Spec.UpdateStrategy.RollingUpdate = &v1beta1.RollingUpdateStatefulSetStrategy{}
}
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 {
maxUnavailable := intstr.FromInt(1)
@ -52,7 +53,7 @@ func SetDefaultsStatefulSet(obj *v1beta1.StatefulSet, injectTemplateDefaults boo
obj.Spec.UpdateStrategy.RollingUpdate.PodUpdatePolicy = v1beta1.RecreatePodUpdateStrategyType
}
if obj.Spec.UpdateStrategy.RollingUpdate.MinReadySeconds == nil {
obj.Spec.UpdateStrategy.RollingUpdate.MinReadySeconds = utilpointer.Int32Ptr(0)
obj.Spec.UpdateStrategy.RollingUpdate.MinReadySeconds = ptr.To(int32(0))
}
}
@ -68,11 +69,17 @@ func SetDefaultsStatefulSet(obj *v1beta1.StatefulSet, injectTemplateDefaults boo
}
}
if utilfeature.DefaultFeatureGate.Enabled(features.StatefulSetAutoResizePVCGate) {
if obj.Spec.VolumeClaimUpdateStrategy.Type == "" {
obj.Spec.VolumeClaimUpdateStrategy.Type = v1beta1.OnPVCDeleteVolumeClaimUpdateStrategyType
}
}
if obj.Spec.Replicas == nil {
obj.Spec.Replicas = utilpointer.Int32Ptr(1)
obj.Spec.Replicas = ptr.To(int32(1))
}
if obj.Spec.RevisionHistoryLimit == nil {
obj.Spec.RevisionHistoryLimit = utilpointer.Int32Ptr(10)
obj.Spec.RevisionHistoryLimit = ptr.To(int32(10))
}
if injectTemplateDefaults {

View File

@ -62,12 +62,21 @@ type InPlaceUpdateState struct {
// UpdateEnvFromMetadata indicates there are envs from annotations/labels that should be in-place update.
UpdateEnvFromMetadata bool `json:"updateEnvFromMetadata,omitempty"`
// UpdateResources indicates there are resources that should be in-place update.
UpdateResources bool `json:"updateResources,omitempty"`
// UpdateImages indicates there are images that should be in-place update.
UpdateImages bool `json:"updateImages,omitempty"`
// NextContainerImages is the containers with lower priority that waiting for in-place update images in next batch.
NextContainerImages map[string]string `json:"nextContainerImages,omitempty"`
// NextContainerRefMetadata is the containers with lower priority that waiting for in-place update labels/annotations in next batch.
NextContainerRefMetadata map[string]metav1.ObjectMeta `json:"nextContainerRefMetadata,omitempty"`
// NextContainerResources is the containers with lower priority that waiting for in-place update resources in next batch.
NextContainerResources map[string]v1.ResourceRequirements `json:"nextContainerResources,omitempty"`
// PreCheckBeforeNext is the pre-check that must pass before the next containers can be in-place update.
PreCheckBeforeNext *InPlaceUpdatePreCheckBeforeNext `json:"preCheckBeforeNext,omitempty"`

View File

@ -29,4 +29,8 @@ const (
ContainerLaunchPriorityKey = "apps.kruise.io/container-launch-priority"
// ContainerLaunchOrdered is the annotation value that indicates containers in pod should be launched by ordinal.
ContainerLaunchOrdered = "Ordered"
// ContainerLaunchPriorityCompletedKey is the annotation indicates the pod has all its priorities
// patched into its barrier configmap.
ContainerLaunchPriorityCompletedKey = "apps.kruise.io/container-launch-priority-completed"
)

View File

@ -1,5 +1,4 @@
//go:build !ignore_autogenerated
// +build !ignore_autogenerated
/*
Copyright 2021 The Kruise Authors.
@ -22,6 +21,7 @@ limitations under the License.
package pub
import (
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/apis/meta/v1"
)
@ -106,6 +106,13 @@ func (in *InPlaceUpdateState) DeepCopyInto(out *InPlaceUpdateState) {
(*out)[key] = *val.DeepCopy()
}
}
if in.NextContainerResources != nil {
in, out := &in.NextContainerResources, &out.NextContainerResources
*out = make(map[string]corev1.ResourceRequirements, len(*in))
for key, val := range *in {
(*out)[key] = *val.DeepCopy()
}
}
if in.PreCheckBeforeNext != nil {
in, out := &in.PreCheckBeforeNext, &out.PreCheckBeforeNext
*out = new(InPlaceUpdatePreCheckBeforeNext)

View File

@ -17,10 +17,11 @@ limitations under the License.
package v1alpha1
import (
appspub "github.com/openkruise/kruise/apis/apps/pub"
v1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/util/intstr"
appspub "github.com/openkruise/kruise/apis/apps/pub"
)
const (
@ -176,6 +177,12 @@ type CloneSetStatus struct {
// indicated by updateRevision and have a Ready Condition.
UpdatedReadyReplicas int32 `json:"updatedReadyReplicas"`
// UpdatedAvailableReplicas is the number of Pods created by the CloneSet controller from the CloneSet version
// indicated by updateRevision and have a Ready Condition for at least minReadySeconds.
// Notice: when enable InPlaceWorkloadVerticalScaling, pod during resource resizing will also be unavailable.
// This means these pod will be counted in maxUnavailable.
UpdatedAvailableReplicas int32 `json:"updatedAvailableReplicas,omitempty"`
// ExpectedUpdatedReplicas is the number of Pods that should be updated by CloneSet controller.
// This field is calculated via Replicas - Partition.
ExpectedUpdatedReplicas int32 `json:"expectedUpdatedReplicas,omitempty"`
@ -233,6 +240,7 @@ type CloneSetCondition struct {
// +kubebuilder:printcolumn:name="DESIRED",type="integer",JSONPath=".spec.replicas",description="The desired number of pods."
// +kubebuilder:printcolumn:name="UPDATED",type="integer",JSONPath=".status.updatedReplicas",description="The number of pods updated."
// +kubebuilder:printcolumn:name="UPDATED_READY",type="integer",JSONPath=".status.updatedReadyReplicas",description="The number of pods updated and ready."
// +kubebuilder:printcolumn:name="UPDATED_AVAILABLE",type="integer",JSONPath=".status.updatedAvailableReplicas",description="The number of pods updated and available."
// +kubebuilder:printcolumn:name="READY",type="integer",JSONPath=".status.readyReplicas",description="The number of pods ready."
// +kubebuilder:printcolumn:name="TOTAL",type="integer",JSONPath=".status.replicas",description="The number of currently all pods."
// +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp",description="CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC."

View File

@ -44,7 +44,9 @@ type ContainerRecreateRequestSpec struct {
// PodName is name of the Pod that owns the recreated containers.
PodName string `json:"podName"`
// Containers contains the containers that need to recreate in the Pod.
Containers []ContainerRecreateRequestContainer `json:"containers"`
// +patchMergeKey=name
// +patchStrategy=merge
Containers []ContainerRecreateRequestContainer `json:"containers" patchStrategy:"merge" patchMergeKey:"name"`
// Strategy defines strategies for containers recreation.
Strategy *ContainerRecreateRequestStrategy `json:"strategy,omitempty"`
// ActiveDeadlineSeconds is the deadline duration of this ContainerRecreateRequest.

View File

@ -17,11 +17,12 @@ limitations under the License.
package v1alpha1
import (
appspub "github.com/openkruise/kruise/apis/apps/pub"
appsv1 "k8s.io/api/apps/v1"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/util/intstr"
appspub "github.com/openkruise/kruise/apis/apps/pub"
)
// DaemonSetUpdateStrategy is a struct used to control the update strategy for a DaemonSet.
@ -91,7 +92,7 @@ type RollingUpdateDaemonSet struct {
// pod is available (Ready for at least minReadySeconds) the old DaemonSet pod
// on that node is marked deleted. If the old pod becomes unavailable for any
// reason (Ready transitions to false, is evicted, or is drained) an updated
// pod is immediatedly created on that node without considering surge limits.
// pod is immediately created on that node without considering surge limits.
// Allowing surge implies the possibility that the resources consumed by the
// daemonset on any given node can double if the readiness check fails, and
// so resource intensive daemonsets should take into account that they may

View File

@ -75,7 +75,9 @@ type EphemeralContainerTemplateSpec struct {
// EphemeralContainers defines ephemeral container list in match pods.
// +kubebuilder:pruning:PreserveUnknownFields
// +kubebuilder:validation:Schemaless
EphemeralContainers []v1.EphemeralContainer `json:"ephemeralContainers"`
// +patchMergeKey=name
// +patchStrategy=merge
EphemeralContainers []v1.EphemeralContainer `json:"ephemeralContainers" patchStrategy:"merge" patchMergeKey:"name"`
}
// EphemeralJobStatus defines the observed state of EphemeralJob

View File

@ -0,0 +1,109 @@
/*
Copyright 2023 The Kruise Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package v1alpha1
import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
// ImageListPullJobSpec defines the desired state of ImageListPullJob
type ImageListPullJobSpec struct {
// Images is the image list to be pulled by the job
Images []string `json:"images"`
ImagePullJobTemplate `json:",inline"`
}
// ImageListPullJobStatus defines the observed state of ImageListPullJob
type ImageListPullJobStatus struct {
// Represents time when the job was acknowledged by the job controller.
// It is not guaranteed to be set in happens-before order across separate operations.
// It is represented in RFC3339 form and is in UTC.
// +optional
StartTime *metav1.Time `json:"startTime,omitempty"`
// Represents time when the all the image pull job was completed. It is not guaranteed to
// be set in happens-before order across separate operations.
// It is represented in RFC3339 form and is in UTC.
// +optional
CompletionTime *metav1.Time `json:"completionTime,omitempty"`
// The desired number of ImagePullJobs, this is typically equal to the number of len(spec.Images).
Desired int32 `json:"desired"`
// The number of running ImagePullJobs which are acknowledged by the imagepulljob controller.
// +optional
Active int32 `json:"active"`
// The number of ImagePullJobs which are finished
// +optional
Completed int32 `json:"completed"`
// The number of image pull job which are finished and status.Succeeded==status.Desired.
// +optional
Succeeded int32 `json:"succeeded"`
// The status of ImagePullJob which has the failed nodes(status.Failed>0) .
// +optional
FailedImageStatuses []*FailedImageStatus `json:"failedImageStatuses,omitempty"`
}
// FailedImageStatus the state of ImagePullJob which has the failed nodes(status.Failed>0)
type FailedImageStatus struct {
// The name of ImagePullJob which has the failed nodes(status.Failed>0)
// +optional
ImagePullJob string `json:"imagePullJob,omitempty"`
// Name of the image
// +optional
Name string `json:"name,omitempty"`
// The text prompt for job running status.
// +optional
Message string `json:"message,omitempty"`
}
// +genclient
// +k8s:openapi-gen=true
// +kubebuilder:object:root=true
// +kubebuilder:subresource:status
// +kubebuilder:printcolumn:name="TOTAL",type="integer",JSONPath=".status.desired",description="Number of image pull job"
// +kubebuilder:printcolumn:name="SUCCEEDED",type="integer",JSONPath=".status.succeeded",description="Number of image pull job succeeded"
// +kubebuilder:printcolumn:name="COMPLETED",type="integer",JSONPath=".status.completed",description="Number of ImagePullJobs which are finished"
// +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp",description="CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC."
// ImageListPullJob is the Schema for the imagelistpulljobs API
type ImageListPullJob struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec ImageListPullJobSpec `json:"spec,omitempty"`
Status ImageListPullJobStatus `json:"status,omitempty"`
}
// +kubebuilder:object:root=true
// ImageListPullJobList contains a list of ImageListPullJob
type ImageListPullJobList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []ImageListPullJob `json:"items"`
}
func init() {
SchemeBuilder.Register(&ImageListPullJob{}, &ImageListPullJobList{})
}

View File

@ -27,10 +27,25 @@ const (
ImagePreDownloadMinUpdatedReadyPods = "apps.kruise.io/image-predownload-min-updated-ready-pods"
)
// ImagePullPolicy describes a policy for if/when to pull a container image
// +enum
type ImagePullPolicy string
const (
// PullAlways means that kruise-daemon always attempts to pull the latest image.
PullAlways ImagePullPolicy = "Always"
// PullIfNotPresent means that kruise-daemon pulls if the image isn't present on disk.
PullIfNotPresent ImagePullPolicy = "IfNotPresent"
)
// ImagePullJobSpec defines the desired state of ImagePullJob
type ImagePullJobSpec struct {
// Image is the image to be pulled by the job
Image string `json:"image"`
Image string `json:"image"`
ImagePullJobTemplate `json:",inline"`
}
type ImagePullJobTemplate struct {
// ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling the image.
// If specified, these secrets will be passed to individual puller implementations for them to use. For example,
@ -65,6 +80,11 @@ type ImagePullJobSpec struct {
// SandboxConfig support attach metadata in PullImage CRI interface during ImagePulljobs
// +optional
SandboxConfig *SandboxConfig `json:"sandboxConfig,omitempty"`
// Image pull policy.
// One of Always, IfNotPresent. Defaults to IfNotPresent.
// +optional
ImagePullPolicy ImagePullPolicy `json:"imagePullPolicy,omitempty"`
}
// ImagePullJobPodSelector is a selector over pods

View File

@ -17,6 +17,7 @@ limitations under the License.
package v1alpha1
import (
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
@ -32,6 +33,8 @@ type PodProbe struct {
Namespace string `json:"namespace"`
// pod uid
UID string `json:"uid"`
// pod ip
IP string `json:"IP"`
// Custom container probe, supports Exec, Tcp, and returns the result to Pod yaml
Probes []ContainerProbe `json:"probes,omitempty"`
}
@ -85,6 +88,17 @@ const (
ProbeUnknown ProbeState = "Unknown"
)
func (p ProbeState) IsEqualPodConditionStatus(status corev1.ConditionStatus) bool {
switch status {
case corev1.ConditionTrue:
return p == ProbeSucceeded
case corev1.ConditionFalse:
return p == ProbeFailed
default:
return p == ProbeUnknown
}
}
// +genclient
// +genclient:nonNamespaced
// +k8s:openapi-gen=true

View File

@ -80,6 +80,11 @@ type ImageTagSpec struct {
// Value must be treated as opaque by clients and .
// +optional
Version int64 `json:"version,omitempty"`
// Image pull policy.
// One of Always, IfNotPresent. Defaults to IfNotPresent.
// +optional
ImagePullPolicy ImagePullPolicy `json:"imagePullPolicy,omitempty"`
}
// ImageTagPullPolicy defines the policy of the pulling task
@ -125,6 +130,10 @@ type NodeImageStatus struct {
// +optional
Pulling int32 `json:"pulling"`
// The number of pulling tasks which are waiting.
// +optional
Waiting int32 `json:"waiting"`
// all statuses of active image pulling tasks
ImageStatuses map[string]ImageStatus `json:"imageStatuses,omitempty"`

View File

@ -21,6 +21,31 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
const (
// PodProbeMarkerAnnotationKey records the Probe Spec, mainly used for serverless Pod scenarios, as follows:
// annotations:
// kruise.io/podprobe: |
// [
// {
// "containerName": "minecraft",
// "name": "healthy",
// "podConditionType": "game.kruise.io/healthy",
// "probe": {
// "exec": {
// "command": [
// "bash",
// "/data/probe.sh"
// ]
// }
// }
// }
// ]
PodProbeMarkerAnnotationKey = "kruise.io/podprobe"
// PodProbeMarkerListAnnotationKey records the injected PodProbeMarker Name List
// example: kruise.io/podprobemarker-list="probe-marker-1,probe-marker-2"
PodProbeMarkerListAnnotationKey = "kruise.io/podprobemarker-list"
)
// PodProbeMarkerSpec defines the desired state of PodProbeMarker
type PodProbeMarkerSpec struct {
// Selector is a label query over pods that should exec custom probe
@ -31,7 +56,9 @@ type PodProbeMarkerSpec struct {
// Probe Result will record in Pod.Status.Conditions, and condition.type=probe.name.
// condition.status=True indicates probe success
// condition.status=False indicates probe fails
Probes []PodContainerProbe `json:"probes"`
// +patchMergeKey=name
// +patchStrategy=merge
Probes []PodContainerProbe `json:"probes" patchStrategy:"merge" patchMergeKey:"name"`
}
type PodContainerProbe struct {
@ -44,7 +71,9 @@ type PodContainerProbe struct {
// According to the execution result of ContainerProbe, perform specific actions,
// such as: patch Pod labels, annotations, ReadinessGate Condition
// It cannot be null at the same time as PodConditionType.
MarkerPolicy []ProbeMarkerPolicy `json:"markerPolicy,omitempty"`
// +patchMergeKey=state
// +patchStrategy=merge
MarkerPolicy []ProbeMarkerPolicy `json:"markerPolicy,omitempty" patchStrategy:"merge" patchMergeKey:"state"`
// If it is not empty, the Probe execution result will be recorded on the Pod condition.
// It cannot be null at the same time as MarkerPolicy.
// For example PodConditionType=game.kruise.io/healthy, pod.status.condition.type = game.kruise.io/healthy.

View File

@ -69,8 +69,10 @@ type ResourceDistributionTargetNamespaces struct {
Pattern string `json:"pattern,omitempty"`
*/
// +patchMergeKey=name
// +patchStrategy=merge
// +optional
List []ResourceDistributionNamespace `json:"list,omitempty"`
List []ResourceDistributionNamespace `json:"list,omitempty" patchStrategy:"merge" patchMergeKey:"name"`
}
// ResourceDistributionNamespace contains a namespace name

View File

@ -17,6 +17,7 @@ limitations under the License.
package v1alpha1
import (
appspub "github.com/openkruise/kruise/apis/apps/pub"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/util/intstr"
@ -48,15 +49,21 @@ type SidecarSetSpec struct {
// InitContainers is the list of init containers to be injected into the selected pod
// We will inject those containers by their name in ascending order
// We only inject init containers when a new pod is created, it does not apply to any existing pod
InitContainers []SidecarContainer `json:"initContainers,omitempty"`
// +patchMergeKey=name
// +patchStrategy=merge
InitContainers []SidecarContainer `json:"initContainers,omitempty" patchStrategy:"merge" patchMergeKey:"name"`
// Containers is the list of sidecar containers to be injected into the selected pod
Containers []SidecarContainer `json:"containers,omitempty"`
// +patchMergeKey=name
// +patchStrategy=merge
Containers []SidecarContainer `json:"containers,omitempty" patchStrategy:"merge" patchMergeKey:"name"`
// List of volumes that can be mounted by sidecar containers
// +kubebuilder:pruning:PreserveUnknownFields
// +kubebuilder:validation:Schemaless
Volumes []corev1.Volume `json:"volumes,omitempty"`
// +patchMergeKey=name
// +patchStrategy=merge
Volumes []corev1.Volume `json:"volumes,omitempty" patchStrategy:"merge" patchMergeKey:"name"`
// The sidecarset updateStrategy to use to replace existing pods with new ones.
UpdateStrategy SidecarSetUpdateStrategy `json:"updateStrategy,omitempty"`
@ -65,7 +72,9 @@ type SidecarSetSpec struct {
InjectionStrategy SidecarSetInjectionStrategy `json:"injectionStrategy,omitempty"`
// List of the names of secrets required by pulling sidecar container images
ImagePullSecrets []corev1.LocalObjectReference `json:"imagePullSecrets,omitempty"`
// +patchMergeKey=name
// +patchStrategy=merge
ImagePullSecrets []corev1.LocalObjectReference `json:"imagePullSecrets,omitempty" patchStrategy:"merge" patchMergeKey:"name"`
// RevisionHistoryLimit indicates the maximum quantity of stored revisions about the SidecarSet.
// default value is 10
@ -123,9 +132,14 @@ type SidecarContainer struct {
UpgradeStrategy SidecarContainerUpgradeStrategy `json:"upgradeStrategy,omitempty"`
// 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"`
// 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
// SourceContainerName is pod.spec.container[x].name; EnvName is pod.spec.container[x].Env.name
TransferEnv []TransferEnvVar `json:"transferEnv,omitempty"`
@ -207,7 +221,8 @@ type SidecarSetInjectRevision struct {
// + optional
RevisionName *string `json:"revisionName,omitempty"`
// Policy describes the behavior of revision injection.
// Defaults to Always.
// +kubebuilder:validation:Enum=Always;Partial;
// +kubebuilder:default=Always
Policy SidecarSetInjectRevisionPolicy `json:"policy,omitempty"`
}
@ -217,9 +232,15 @@ const (
// AlwaysSidecarSetInjectRevisionPolicy means the SidecarSet will always inject
// the specific revision to Pods when pod creating, except matching UpdateStrategy.Selector.
AlwaysSidecarSetInjectRevisionPolicy SidecarSetInjectRevisionPolicy = "Always"
// PartitionBasedSidecarSetInjectRevisionPolicy means the SidecarSet will inject the
// specific or the latest revision according to Partition.
//PartitionBasedSidecarSetInjectRevisionPolicy SidecarSetInjectRevisionPolicy = "PartitionBased"
// PartialSidecarSetInjectRevisionPolicy means the SidecarSet will inject the specific or the latest revision according to UpdateStrategy.
//
// If UpdateStrategy.Pause is not true, only when a newly created Pod is **not** selected by the Selector explicitly
// configured in `UpdateStrategy` will it be injected with the specified version of the Sidecar.
// Under all other conditions, newly created Pods have a probability of being injected with the latest Sidecar,
// where the probability is `1 - UpdateStrategy.Partition`.
// If `Partition` is not a percentage or is not configured, its value is considered to be 0%.
PartialSidecarSetInjectRevisionPolicy SidecarSetInjectRevisionPolicy = "Partial"
)
// SidecarSetUpdateStrategy indicates the strategy that the SidecarSet
@ -233,11 +254,15 @@ type SidecarSetUpdateStrategy struct {
Type SidecarSetUpdateStrategyType `json:"type,omitempty"`
// Paused indicates that the SidecarSet is paused to update the injected pods,
// but it don't affect the webhook inject sidecar container into the newly created pods.
// default is false
// For the impact on the injection behavior for newly created Pods, please refer to the comments of Selector.
Paused bool `json:"paused,omitempty"`
// 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
// 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,
// which is consistent with previous versions.
Selector *metav1.LabelSelector `json:"selector,omitempty"`
// Partition is the desired number of pods in old revisions. It means when partition
@ -252,7 +277,9 @@ type SidecarSetUpdateStrategy struct {
// This cannot be 0.
// Default value is 1.
MaxUnavailable *intstr.IntOrString `json:"maxUnavailable,omitempty"`
// Priorities are the rules for calculating the priority of updating pods.
// Each pod to be updated, will pass through these terms and get a sum of weights.
PriorityStrategy *appspub.UpdatePriorityStrategy `json:"priorityStrategy,omitempty"`
// ScatterStrategy defines the scatter rules to make pods been scattered when update.
// This will avoid pods with the same key-value to be updated in one batch.
// - Note that pods will be scattered after priority sort. So, although priority strategy and scatter strategy can be applied together, we suggest to use either one of them.

View File

@ -17,10 +17,13 @@ limitations under the License.
package v1alpha1
import (
"time"
"github.com/openkruise/kruise/apis/apps/v1beta1"
appsv1 "k8s.io/api/apps/v1"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/util/intstr"
)
@ -45,6 +48,8 @@ const (
SubsetUpdated UnitedDeploymentConditionType = "SubsetUpdated"
// SubsetFailure is added to a UnitedDeployment when one of its subsets has failure during its own reconciling.
SubsetFailure UnitedDeploymentConditionType = "SubsetFailure"
// UnitedDeploymentUpdated means currentRevision is equal to updatedRevision.
UnitedDeploymentUpdated UnitedDeploymentConditionType = "UnitedDeploymentUpdated"
)
// UnitedDeploymentSpec defines the desired state of UnitedDeployment.
@ -159,8 +164,14 @@ type ManualUpdate struct {
type Topology struct {
// Contains the details of each subset. Each element in this array represents one subset
// which will be provisioned and managed by UnitedDeployment.
// +patchMergeKey=name
// +patchStrategy=merge
// +optional
Subsets []Subset `json:"subsets,omitempty"`
Subsets []Subset `json:"subsets,omitempty" patchStrategy:"merge" patchMergeKey:"name"`
// ScheduleStrategy indicates the strategy the UnitedDeployment used to preform the schedule between each of subsets.
// +optional
ScheduleStrategy UnitedDeploymentScheduleStrategy `json:"scheduleStrategy,omitempty"`
}
// Subset defines the detail of a subset.
@ -185,8 +196,107 @@ type Subset struct {
// percentage like '10%', which means 10% of UnitedDeployment replicas of pods will be distributed
// under this subset. If nil, the number of replicas in this subset is determined by controller.
// Controller will try to keep all the subsets with nil replicas have average pods.
// Replicas and MinReplicas/MaxReplicas are mutually exclusive in a UnitedDeployment.
// +optional
Replicas *intstr.IntOrString `json:"replicas,omitempty"`
// Indicates the lower bounded replicas of the subset.
// MinReplicas must be more than or equal to 0 if it is set.
// Controller will prioritize satisfy minReplicas for each subset
// according to the order of Topology.Subsets.
// Defaults to 0.
// +optional
MinReplicas *intstr.IntOrString `json:"minReplicas,omitempty"`
// Indicates the upper bounded replicas of the subset.
// MaxReplicas must be more than or equal to MinReplicas.
// MaxReplicas == nil means no limitation.
// Please ensure that at least one subset has empty MaxReplicas(no limitation) to avoid stuck scaling.
// Defaults to nil.
// +optional
MaxReplicas *intstr.IntOrString `json:"maxReplicas,omitempty"`
// Patch indicates patching to the templateSpec.
// Patch takes precedence over other fields
// If the Patch also modifies the Replicas, NodeSelectorTerm or Tolerations, use value in the Patch
// +optional
// +kubebuilder:pruning:PreserveUnknownFields
// +kubebuilder:validation:Schemaless
Patch runtime.RawExtension `json:"patch,omitempty"`
}
// UnitedDeploymentScheduleStrategyType is a string enumeration type that enumerates
// all possible schedule strategies for the UnitedDeployment controller.
// +kubebuilder:validation:Enum=Adaptive;Fixed;""
type UnitedDeploymentScheduleStrategyType string
const (
// AdaptiveUnitedDeploymentScheduleStrategyType represents that when a pod is stuck in the pending status and cannot
// be scheduled, allow it to be rescheduled to another subset.
AdaptiveUnitedDeploymentScheduleStrategyType UnitedDeploymentScheduleStrategyType = "Adaptive"
// FixedUnitedDeploymentScheduleStrategyType represents that pods are strictly scheduled to the selected subset
// even if scheduling fail.
FixedUnitedDeploymentScheduleStrategyType UnitedDeploymentScheduleStrategyType = "Fixed"
)
const (
DefaultRescheduleCriticalDuration = 30 * time.Second
DefaultUnschedulableStatusLastDuration = 300 * time.Second
)
// AdaptiveUnitedDeploymentStrategy is used to communicate parameters when Type is AdaptiveUnitedDeploymentScheduleStrategyType.
type AdaptiveUnitedDeploymentStrategy struct {
// RescheduleCriticalSeconds indicates how long controller will reschedule a schedule failed Pod to the subset that has
// redundant capacity after the subset where the Pod lives. If a Pod was scheduled failed and still in an unschedulabe status
// over RescheduleCriticalSeconds duration, the controller will reschedule it to a suitable subset. Default is 30 seconds.
// +optional
RescheduleCriticalSeconds *int32 `json:"rescheduleCriticalSeconds,omitempty"`
// 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.
// +optional
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.
type UnitedDeploymentScheduleStrategy struct {
// Type indicates the type of the UnitedDeploymentScheduleStrategy.
// Default is Fixed
// +optional
Type UnitedDeploymentScheduleStrategyType `json:"type,omitempty"`
// Adaptive is used to communicate parameters when Type is AdaptiveUnitedDeploymentScheduleStrategyType.
// +optional
Adaptive *AdaptiveUnitedDeploymentStrategy `json:"adaptive,omitempty"`
}
func (s *UnitedDeploymentScheduleStrategy) IsAdaptive() bool {
return s.Type == AdaptiveUnitedDeploymentScheduleStrategyType
}
func (s *UnitedDeploymentScheduleStrategy) ShouldReserveUnschedulablePods() bool {
return s.IsAdaptive() && s.Adaptive != nil && s.Adaptive.ReserveUnschedulablePods
}
func (s *UnitedDeploymentScheduleStrategy) GetRescheduleCriticalDuration() time.Duration {
if s.Adaptive == nil || s.Adaptive.RescheduleCriticalSeconds == nil {
return DefaultRescheduleCriticalDuration
}
return time.Duration(*s.Adaptive.RescheduleCriticalSeconds) * time.Second
}
func (s *UnitedDeploymentScheduleStrategy) GetUnschedulableDuration() time.Duration {
if s.Adaptive == nil || s.Adaptive.UnschedulableDuration == nil {
return DefaultUnschedulableStatusLastDuration
}
return time.Duration(*s.Adaptive.UnschedulableDuration) * time.Second
}
// UnitedDeploymentStatus defines the observed state of UnitedDeployment.
@ -206,6 +316,9 @@ type UnitedDeploymentStatus struct {
// The number of pods in current version.
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.
// +optional
UpdatedReadyReplicas int32 `json:"updatedReadyReplicas,omitempty"`
@ -223,6 +336,8 @@ type UnitedDeploymentStatus struct {
// +optional
SubsetReplicas map[string]int32 `json:"subsetReplicas,omitempty"`
// Record the conditions of each subset.
SubsetStatuses []UnitedDeploymentSubsetStatus `json:"subsetStatuses,omitempty"`
// Represents the latest available observations of a UnitedDeployment's current state.
// +optional
Conditions []UnitedDeploymentCondition `json:"conditions,omitempty"`
@ -230,6 +345,18 @@ type UnitedDeploymentStatus struct {
// Records the information of update progress.
// +optional
UpdateStatus *UpdateStatus `json:"updateStatus,omitempty"`
// LabelSelector is label selectors for query over pods that should match the replica count used by HPA.
LabelSelector string `json:"labelSelector,omitempty"`
}
func (s *UnitedDeploymentStatus) GetSubsetStatus(subset string) *UnitedDeploymentSubsetStatus {
for i, subsetStatus := range s.SubsetStatuses {
if subsetStatus.Name == subset {
return &s.SubsetStatuses[i]
}
}
return nil
}
// UnitedDeploymentCondition describes current state of a UnitedDeployment.
@ -246,7 +373,7 @@ type UnitedDeploymentCondition struct {
// The reason for the condition's last transition.
Reason string `json:"reason,omitempty"`
// A human readable message indicating details about the transition.
// A human-readable message indicating details about the transition.
Message string `json:"message,omitempty"`
}
@ -261,13 +388,73 @@ type UpdateStatus struct {
CurrentPartitions map[string]int32 `json:"currentPartitions,omitempty"`
}
type UnitedDeploymentSubsetStatus struct {
// Subset name specified in Topology.Subsets
Name string `json:"name,omitempty"`
// Records the current replicas. Currently unused.
Replicas int32 `json:"replicas,omitempty"`
// Records the current ready replicas. Currently unused.
ReadyReplicas int32 `json:"readyReplicas,omitempty"`
// Records the current partition. Currently unused.
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 []UnitedDeploymentSubsetCondition `json:"conditions,omitempty"`
}
func (s *UnitedDeploymentSubsetStatus) GetCondition(condType UnitedDeploymentSubsetConditionType) *UnitedDeploymentSubsetCondition {
for _, condition := range s.Conditions {
if condition.Type == condType {
return &condition
}
}
return nil
}
func (s *UnitedDeploymentSubsetStatus) SetCondition(condType UnitedDeploymentSubsetConditionType, status corev1.ConditionStatus, reason, message string) {
var currentCond *UnitedDeploymentSubsetCondition
for i, c := range s.Conditions {
if c.Type == condType {
currentCond = &s.Conditions[i]
break
}
}
if currentCond != nil && currentCond.Status == status && currentCond.Reason == reason {
return
}
if currentCond == nil {
s.Conditions = append(s.Conditions, UnitedDeploymentSubsetCondition{Type: condType})
currentCond = &s.Conditions[len(s.Conditions)-1]
}
currentCond.LastTransitionTime = metav1.Now()
currentCond.Status = status
currentCond.Reason = reason
currentCond.Message = message
}
type UnitedDeploymentSubsetConditionType string
const (
// UnitedDeploymentSubsetSchedulable means new pods allocated into the subset will keep pending.
UnitedDeploymentSubsetSchedulable UnitedDeploymentSubsetConditionType = "Schedulable"
)
type UnitedDeploymentSubsetCondition struct {
Type UnitedDeploymentSubsetConditionType `json:"type"`
Status corev1.ConditionStatus `json:"status"`
LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"`
Reason string `json:"reason,omitempty"`
Message string `json:"message,omitempty"`
}
// +genclient
// +genclient:method=GetScale,verb=get,subresource=scale,result=k8s.io/api/autoscaling/v1.Scale
// +genclient:method=UpdateScale,verb=update,subresource=scale,input=k8s.io/api/autoscaling/v1.Scale,result=k8s.io/api/autoscaling/v1.Scale
// +k8s:openapi-gen=true
// +kubebuilder:object:root=true
// +kubebuilder:subresource:status
// +kubebuilder:subresource:scale:specpath=.spec.replicas,statuspath=.status.replicas,selectorpath=.status.selector
// +kubebuilder:subresource:scale:specpath=.spec.replicas,statuspath=.status.replicas,selectorpath=.status.labelSelector
// +kubebuilder:resource:shortName=ud
// +kubebuilder:printcolumn:name="DESIRED",type="integer",JSONPath=".spec.replicas",description="The desired number of pods."
// +kubebuilder:printcolumn:name="CURRENT",type="integer",JSONPath=".status.replicas",description="The number of currently all pods."

View File

@ -0,0 +1,8 @@
package v1alpha1
const (
// AnnotationUsingEnhancedLiveness indicates that the enhanced liveness probe of pod is enabled.
AnnotationUsingEnhancedLiveness = "apps.kruise.io/using-enhanced-liveness"
// AnnotationUsingEnhancedLiveness indicates the backup probe (json types) of the pod native container livnessprobe configuration.
AnnotationNativeContainerProbeContext = "apps.kruise.io/container-probe-context"
)

View File

@ -4,6 +4,9 @@ const (
// ControllerRevisionHashLabelKey is used to record the controller revision of current resource.
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 = "apps.kruise.io/subset-name"
@ -15,6 +18,8 @@ const (
// ImagePreDownloadIgnoredKey indicates the images of this revision have been ignored to pre-download
ImagePreDownloadIgnoredKey = "apps.kruise.io/image-predownload-ignored"
// AnnotationSubsetPatchKey indicates the patch for every subset
AnnotationSubsetPatchKey = "apps.kruise.io/subset-patch"
)
// Sidecar container environment variable definitions which are used to enable SidecarTerminator to take effect on the sidecar container.
@ -27,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
// strategy to terminate sidecar containers.
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

@ -28,8 +28,15 @@ type WorkloadSpreadSpec struct {
// TargetReference is the target workload that WorkloadSpread want to control.
TargetReference *TargetReference `json:"targetRef"`
// TargetFilter allows WorkloadSpread to manage only a portion of the Pods in the TargetReference:
// by specifying the criteria for the Pods to be managed through a label selector,
// and by specifying how to obtain the total number of these selected Pods from the workload using replicasPaths.
TargetFilter *TargetFilter `json:"targetFilter,omitempty"`
// Subsets describes the pods distribution details between each of subsets.
Subsets []WorkloadSpreadSubset `json:"subsets"`
// +patchMergeKey=name
// +patchStrategy=merge
Subsets []WorkloadSpreadSubset `json:"subsets" patchStrategy:"merge" patchMergeKey:"name"`
// ScheduleStrategy indicates the strategy the WorkloadSpread used to preform the schedule between each of subsets.
// +optional
@ -46,6 +53,58 @@ type TargetReference struct {
Name string `json:"name"`
}
/*
TargetFilter is an optional parameter that allows WorkloadSpread to manage only a subset of the Pods generated by the target workload.
For example, suppose a WorkloadSpread points to the following Kubeflow TFJob resource:
```yaml
apiVersion: kubeflow.org/v1
kind: TFJob
spec:
tfReplicaSpecs:
PS:
replicas: 1
...
MASTER:
replicas: 1
...
Worker:
replicas: 2
...
```
If you want to manage only the 2 Worker Pods that are generated, you need to configure the TargetFilter as follows:
```yaml
targetFilter:
selector:
matchLabels:
role: worker
replicasPathList:
- spec.tfReplicaSpecs.Worker.replicas
```
With this configuration, the PS Pods and Master Pods generated by the TFJob will not be managed by WorkloadSpread and will not be
counted toward the total number of replicas.
*/
type TargetFilter struct {
// Selector is used to filter the Pods to be managed.
//
//+optional
Selector *metav1.LabelSelector `json:"selector,omitempty"`
// ReplicasPathList is a list of resource paths used to specify how to determine the total number of replicas of
// 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.
//
// 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.
//
// +optional
ReplicasPathList []string `json:"replicasPathList,omitempty"`
}
// WorkloadSpreadScheduleStrategyType is a string enumeration type that enumerates
// all possible schedule strategies for the WorkloadSpread controller.
// +kubebuilder:validation:Enum=Adaptive;Fixed;""
@ -128,6 +187,11 @@ type WorkloadSpreadStatus struct {
// Contains the status of each subset. Each element in this array represents one subset
// +optional
SubsetStatuses []WorkloadSpreadSubsetStatus `json:"subsetStatuses,omitempty"`
// VersionedSubsetStatuses is to solve rolling-update problems, where the creation of new-version pod
// may be earlier than deletion of old-version pod. We have to calculate the pod subset distribution for
// each version.
VersionedSubsetStatuses map[string][]WorkloadSpreadSubsetStatus `json:"versionedSubsetStatuses,omitempty"`
}
type WorkloadSpreadSubsetConditionType string

View File

@ -1,5 +1,4 @@
//go:build !ignore_autogenerated
// +build !ignore_autogenerated
/*
Copyright 2021 The Kruise Authors.
@ -31,6 +30,31 @@ import (
"k8s.io/apimachinery/pkg/util/intstr"
)
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *AdaptiveUnitedDeploymentStrategy) DeepCopyInto(out *AdaptiveUnitedDeploymentStrategy) {
*out = *in
if in.RescheduleCriticalSeconds != nil {
in, out := &in.RescheduleCriticalSeconds, &out.RescheduleCriticalSeconds
*out = new(int32)
**out = **in
}
if in.UnschedulableDuration != nil {
in, out := &in.UnschedulableDuration, &out.UnschedulableDuration
*out = new(int32)
**out = **in
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AdaptiveUnitedDeploymentStrategy.
func (in *AdaptiveUnitedDeploymentStrategy) DeepCopy() *AdaptiveUnitedDeploymentStrategy {
if in == nil {
return nil
}
out := new(AdaptiveUnitedDeploymentStrategy)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *AdaptiveWorkloadSpreadStrategy) DeepCopyInto(out *AdaptiveWorkloadSpreadStrategy) {
*out = *in
@ -1203,6 +1227,21 @@ func (in *EphemeralJobStatus) DeepCopy() *EphemeralJobStatus {
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *FailedImageStatus) DeepCopyInto(out *FailedImageStatus) {
*out = *in
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FailedImageStatus.
func (in *FailedImageStatus) DeepCopy() *FailedImageStatus {
if in == nil {
return nil
}
out := new(FailedImageStatus)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *FailurePolicy) DeepCopyInto(out *FailurePolicy) {
*out = *in
@ -1218,6 +1257,120 @@ func (in *FailurePolicy) DeepCopy() *FailurePolicy {
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ImageListPullJob) DeepCopyInto(out *ImageListPullJob) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
in.Spec.DeepCopyInto(&out.Spec)
in.Status.DeepCopyInto(&out.Status)
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageListPullJob.
func (in *ImageListPullJob) DeepCopy() *ImageListPullJob {
if in == nil {
return nil
}
out := new(ImageListPullJob)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *ImageListPullJob) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ImageListPullJobList) DeepCopyInto(out *ImageListPullJobList) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ListMeta.DeepCopyInto(&out.ListMeta)
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]ImageListPullJob, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageListPullJobList.
func (in *ImageListPullJobList) DeepCopy() *ImageListPullJobList {
if in == nil {
return nil
}
out := new(ImageListPullJobList)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *ImageListPullJobList) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ImageListPullJobSpec) DeepCopyInto(out *ImageListPullJobSpec) {
*out = *in
if in.Images != nil {
in, out := &in.Images, &out.Images
*out = make([]string, len(*in))
copy(*out, *in)
}
in.ImagePullJobTemplate.DeepCopyInto(&out.ImagePullJobTemplate)
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageListPullJobSpec.
func (in *ImageListPullJobSpec) DeepCopy() *ImageListPullJobSpec {
if in == nil {
return nil
}
out := new(ImageListPullJobSpec)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ImageListPullJobStatus) DeepCopyInto(out *ImageListPullJobStatus) {
*out = *in
if in.StartTime != nil {
in, out := &in.StartTime, &out.StartTime
*out = (*in).DeepCopy()
}
if in.CompletionTime != nil {
in, out := &in.CompletionTime, &out.CompletionTime
*out = (*in).DeepCopy()
}
if in.FailedImageStatuses != nil {
in, out := &in.FailedImageStatuses, &out.FailedImageStatuses
*out = make([]*FailedImageStatus, len(*in))
for i := range *in {
if (*in)[i] != nil {
in, out := &(*in)[i], &(*out)[i]
*out = new(FailedImageStatus)
**out = **in
}
}
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageListPullJobStatus.
func (in *ImageListPullJobStatus) DeepCopy() *ImageListPullJobStatus {
if in == nil {
return nil
}
out := new(ImageListPullJobStatus)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ImagePullJob) DeepCopyInto(out *ImagePullJob) {
*out = *in
@ -1317,37 +1470,7 @@ func (in *ImagePullJobPodSelector) DeepCopy() *ImagePullJobPodSelector {
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ImagePullJobSpec) DeepCopyInto(out *ImagePullJobSpec) {
*out = *in
if in.PullSecrets != nil {
in, out := &in.PullSecrets, &out.PullSecrets
*out = make([]string, len(*in))
copy(*out, *in)
}
if in.Selector != nil {
in, out := &in.Selector, &out.Selector
*out = new(ImagePullJobNodeSelector)
(*in).DeepCopyInto(*out)
}
if in.PodSelector != nil {
in, out := &in.PodSelector, &out.PodSelector
*out = new(ImagePullJobPodSelector)
(*in).DeepCopyInto(*out)
}
if in.Parallelism != nil {
in, out := &in.Parallelism, &out.Parallelism
*out = new(intstr.IntOrString)
**out = **in
}
if in.PullPolicy != nil {
in, out := &in.PullPolicy, &out.PullPolicy
*out = new(PullPolicy)
(*in).DeepCopyInto(*out)
}
in.CompletionPolicy.DeepCopyInto(&out.CompletionPolicy)
if in.SandboxConfig != nil {
in, out := &in.SandboxConfig, &out.SandboxConfig
*out = new(SandboxConfig)
(*in).DeepCopyInto(*out)
}
in.ImagePullJobTemplate.DeepCopyInto(&out.ImagePullJobTemplate)
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImagePullJobSpec.
@ -1388,6 +1511,52 @@ func (in *ImagePullJobStatus) DeepCopy() *ImagePullJobStatus {
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ImagePullJobTemplate) DeepCopyInto(out *ImagePullJobTemplate) {
*out = *in
if in.PullSecrets != nil {
in, out := &in.PullSecrets, &out.PullSecrets
*out = make([]string, len(*in))
copy(*out, *in)
}
if in.Selector != nil {
in, out := &in.Selector, &out.Selector
*out = new(ImagePullJobNodeSelector)
(*in).DeepCopyInto(*out)
}
if in.PodSelector != nil {
in, out := &in.PodSelector, &out.PodSelector
*out = new(ImagePullJobPodSelector)
(*in).DeepCopyInto(*out)
}
if in.Parallelism != nil {
in, out := &in.Parallelism, &out.Parallelism
*out = new(intstr.IntOrString)
**out = **in
}
if in.PullPolicy != nil {
in, out := &in.PullPolicy, &out.PullPolicy
*out = new(PullPolicy)
(*in).DeepCopyInto(*out)
}
in.CompletionPolicy.DeepCopyInto(&out.CompletionPolicy)
if in.SandboxConfig != nil {
in, out := &in.SandboxConfig, &out.SandboxConfig
*out = new(SandboxConfig)
(*in).DeepCopyInto(*out)
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImagePullJobTemplate.
func (in *ImagePullJobTemplate) DeepCopy() *ImagePullJobTemplate {
if in == nil {
return nil
}
out := new(ImagePullJobTemplate)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ImageSpec) DeepCopyInto(out *ImageSpec) {
*out = *in
@ -2542,6 +2711,11 @@ func (in *SidecarContainer) DeepCopyInto(out *SidecarContainer) {
in.Container.DeepCopyInto(&out.Container)
out.UpgradeStrategy = in.UpgradeStrategy
out.ShareVolumePolicy = in.ShareVolumePolicy
if in.ShareVolumeDevicePolicy != nil {
in, out := &in.ShareVolumeDevicePolicy, &out.ShareVolumeDevicePolicy
*out = new(ShareVolumePolicy)
**out = **in
}
if in.TransferEnv != nil {
in, out := &in.TransferEnv, &out.TransferEnv
*out = make([]TransferEnvVar, len(*in))
@ -2805,6 +2979,11 @@ func (in *SidecarSetUpdateStrategy) DeepCopyInto(out *SidecarSetUpdateStrategy)
*out = new(intstr.IntOrString)
**out = **in
}
if in.PriorityStrategy != nil {
in, out := &in.PriorityStrategy, &out.PriorityStrategy
*out = new(pub.UpdatePriorityStrategy)
(*in).DeepCopyInto(*out)
}
if in.ScatterStrategy != nil {
in, out := &in.ScatterStrategy, &out.ScatterStrategy
*out = make(UpdateScatterStrategy, len(*in))
@ -3020,6 +3199,17 @@ func (in *Subset) DeepCopyInto(out *Subset) {
*out = new(intstr.IntOrString)
**out = **in
}
if in.MinReplicas != nil {
in, out := &in.MinReplicas, &out.MinReplicas
*out = new(intstr.IntOrString)
**out = **in
}
if in.MaxReplicas != nil {
in, out := &in.MaxReplicas, &out.MaxReplicas
*out = new(intstr.IntOrString)
**out = **in
}
in.Patch.DeepCopyInto(&out.Patch)
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Subset.
@ -3083,6 +3273,31 @@ func (in *SyncStatus) DeepCopy() *SyncStatus {
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *TargetFilter) DeepCopyInto(out *TargetFilter) {
*out = *in
if in.Selector != nil {
in, out := &in.Selector, &out.Selector
*out = new(metav1.LabelSelector)
(*in).DeepCopyInto(*out)
}
if in.ReplicasPathList != nil {
in, out := &in.ReplicasPathList, &out.ReplicasPathList
*out = make([]string, len(*in))
copy(*out, *in)
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TargetFilter.
func (in *TargetFilter) DeepCopy() *TargetFilter {
if in == nil {
return nil
}
out := new(TargetFilter)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *TargetReference) DeepCopyInto(out *TargetReference) {
*out = *in
@ -3108,6 +3323,7 @@ func (in *Topology) DeepCopyInto(out *Topology) {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
in.ScheduleStrategy.DeepCopyInto(&out.ScheduleStrategy)
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Topology.
@ -3220,6 +3436,26 @@ func (in *UnitedDeploymentList) DeepCopyObject() runtime.Object {
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *UnitedDeploymentScheduleStrategy) DeepCopyInto(out *UnitedDeploymentScheduleStrategy) {
*out = *in
if in.Adaptive != nil {
in, out := &in.Adaptive, &out.Adaptive
*out = new(AdaptiveUnitedDeploymentStrategy)
(*in).DeepCopyInto(*out)
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UnitedDeploymentScheduleStrategy.
func (in *UnitedDeploymentScheduleStrategy) DeepCopy() *UnitedDeploymentScheduleStrategy {
if in == nil {
return nil
}
out := new(UnitedDeploymentScheduleStrategy)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *UnitedDeploymentSpec) DeepCopyInto(out *UnitedDeploymentSpec) {
*out = *in
@ -3268,6 +3504,13 @@ func (in *UnitedDeploymentStatus) DeepCopyInto(out *UnitedDeploymentStatus) {
(*out)[key] = val
}
}
if in.SubsetStatuses != nil {
in, out := &in.SubsetStatuses, &out.SubsetStatuses
*out = make([]UnitedDeploymentSubsetStatus, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
if in.Conditions != nil {
in, out := &in.Conditions, &out.Conditions
*out = make([]UnitedDeploymentCondition, len(*in))
@ -3292,6 +3535,44 @@ func (in *UnitedDeploymentStatus) DeepCopy() *UnitedDeploymentStatus {
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *UnitedDeploymentSubsetCondition) DeepCopyInto(out *UnitedDeploymentSubsetCondition) {
*out = *in
in.LastTransitionTime.DeepCopyInto(&out.LastTransitionTime)
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UnitedDeploymentSubsetCondition.
func (in *UnitedDeploymentSubsetCondition) DeepCopy() *UnitedDeploymentSubsetCondition {
if in == nil {
return nil
}
out := new(UnitedDeploymentSubsetCondition)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *UnitedDeploymentSubsetStatus) DeepCopyInto(out *UnitedDeploymentSubsetStatus) {
*out = *in
if in.Conditions != nil {
in, out := &in.Conditions, &out.Conditions
*out = make([]UnitedDeploymentSubsetCondition, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UnitedDeploymentSubsetStatus.
func (in *UnitedDeploymentSubsetStatus) DeepCopy() *UnitedDeploymentSubsetStatus {
if in == nil {
return nil
}
out := new(UnitedDeploymentSubsetStatus)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *UnitedDeploymentUpdateStrategy) DeepCopyInto(out *UnitedDeploymentUpdateStrategy) {
*out = *in
@ -3475,6 +3756,11 @@ func (in *WorkloadSpreadSpec) DeepCopyInto(out *WorkloadSpreadSpec) {
*out = new(TargetReference)
**out = **in
}
if in.TargetFilter != nil {
in, out := &in.TargetFilter, &out.TargetFilter
*out = new(TargetFilter)
(*in).DeepCopyInto(*out)
}
if in.Subsets != nil {
in, out := &in.Subsets, &out.Subsets
*out = make([]WorkloadSpreadSubset, len(*in))
@ -3505,6 +3791,24 @@ func (in *WorkloadSpreadStatus) DeepCopyInto(out *WorkloadSpreadStatus) {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
if in.VersionedSubsetStatuses != nil {
in, out := &in.VersionedSubsetStatuses, &out.VersionedSubsetStatuses
*out = make(map[string][]WorkloadSpreadSubsetStatus, len(*in))
for key, val := range *in {
var outVal []WorkloadSpreadSubsetStatus
if val == nil {
(*out)[key] = nil
} else {
inVal := (*in)[key]
in, out := &inVal, &outVal
*out = make([]WorkloadSpreadSubsetStatus, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
(*out)[key] = outVal
}
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkloadSpreadStatus.

View File

@ -29,6 +29,39 @@ const (
MaxMinReadySeconds = 300
)
// VolumeClaimUpdateStrategyType defines the update strategy types for volume claims.
// It is an enumerated type that provides two different update strategies.
// +enum
type VolumeClaimUpdateStrategyType string
const (
// OnPodRollingUpdateVolumeClaimUpdateStrategyType indicates that volume claim updates are triggered when associated Pods undergo rolling updates.
// This strategy ensures that storage availability and integrity are maintained during the update process.
OnPodRollingUpdateVolumeClaimUpdateStrategyType VolumeClaimUpdateStrategyType = "OnPodRollingUpdate"
// OnPVCDeleteVolumeClaimUpdateStrategyType indicates that updates are triggered when a Persistent Volume Claim (PVC) is deleted.
// This strategy places full control of the update timing in the hands of the user, typically executed after ensuring data has been backed up or there are no data security concerns,
// allowing for storage resource management that aligns with specific user requirements and security policies.
OnPVCDeleteVolumeClaimUpdateStrategyType VolumeClaimUpdateStrategyType = "OnDelete"
)
// VolumeClaimStatus describes the status of a volume claim template.
// It provides details about the compatibility and readiness of the volume claim.
type VolumeClaimStatus struct {
// VolumeClaimName is the name of the volume claim.
// This is a unique identifier used to reference a specific volume claim.
VolumeClaimName string `json:"volumeClaimName"`
// CompatibleReplicas is the number of replicas currently compatible with the volume claim.
// It indicates how many replicas can function properly, being compatible with this volume claim.
// Compatibility is determined by whether the PVC spec storage requests are greater than or equal to the template spec storage requests
CompatibleReplicas int32 `json:"compatibleReplicas"`
// CompatibleReadyReplicas is the number of replicas that are both ready and compatible with the volume claim.
// It highlights that these replicas are not only compatible but also ready to be put into service immediately.
// Compatibility is determined by whether the pvc spec storage requests are greater than or equal to the template spec storage requests
// The "ready" status is determined by whether the PVC status capacity is greater than or equal to the PVC spec storage requests.
CompatibleReadyReplicas int32 `json:"compatibleReadyReplicas"`
}
// StatefulSetUpdateStrategy indicates the strategy that the StatefulSet
// controller will use to perform updates. It includes any additional parameters
// necessary to perform the update for the indicated strategy.
@ -42,11 +75,18 @@ type StatefulSetUpdateStrategy struct {
RollingUpdate *RollingUpdateStatefulSetStrategy `json:"rollingUpdate,omitempty"`
}
// VolumeClaimUpdateStrategy defines the strategy for updating volume claims.
// This structure is used to control how updates to PersistentVolumeClaims are handled during pod rolling updates or PersistentVolumeClaim deletions.
type VolumeClaimUpdateStrategy struct {
// Type specifies the type of update strategy, possible values include:
// OnPodRollingUpdateVolumeClaimUpdateStrategyType: Apply the update strategy during pod rolling updates.
// OnPVCDeleteVolumeClaimUpdateStrategyType: Apply the update strategy when a PersistentVolumeClaim is deleted.
Type VolumeClaimUpdateStrategyType `json:"type,omitempty"`
}
// RollingUpdateStatefulSetStrategy is used to communicate parameter for RollingUpdateStatefulSetStrategyType.
type RollingUpdateStatefulSetStrategy struct {
// Partition indicates the ordinal at which the StatefulSet should be partitioned by default.
// But if unorderedUpdate has been set:
// - Partition indicates the number of pods with non-updated revisions when rolling update.
// Partition indicates the number of pods the StatefulSet should be partitioned by default.
// - It means controller will update $(replicas - partition) number of pod.
// Default value is 0.
// +optional
@ -128,7 +168,7 @@ const (
)
// StatefulSetPersistentVolumeClaimRetentionPolicy describes the policy used for PVCs
// created from the StatefulSet VolumeClaimTemplates.
// created from the StatefulSet VolumeClaims.
type StatefulSetPersistentVolumeClaimRetentionPolicy struct {
// WhenDeleted specifies what happens to PVCs created from StatefulSet
// VolumeClaimTemplates when the StatefulSet is deleted. The default policy
@ -143,6 +183,21 @@ type StatefulSetPersistentVolumeClaimRetentionPolicy struct {
WhenScaled PersistentVolumeClaimRetentionPolicyType `json:"whenScaled,omitempty"`
}
// StatefulSetOrdinals describes the policy used for replica ordinal assignment
// in this StatefulSet.
type StatefulSetOrdinals struct {
// start is the number representing the first replica's index. It may be used
// to number replicas from an alternate index (eg: 1-indexed) over the default
// 0-indexed names, or to orchestrate progressive movement of replicas from
// one StatefulSet to another.
// If set, replica indices will be in the range:
// [.spec.ordinals.start, .spec.ordinals.start + .spec.replicas).
// If unset, defaults to 0. Replica indices will be in the range:
// [0, .spec.replicas).
// +optional
Start int32 `json:"start" protobuf:"varint,1,opt,name=start"`
}
// StatefulSetSpec defines the desired state of StatefulSet
type StatefulSetSpec struct {
// replicas is the desired number of replicas of the given Template.
@ -178,6 +233,11 @@ type StatefulSetSpec struct {
// +kubebuilder:validation:Schemaless
VolumeClaimTemplates []v1.PersistentVolumeClaim `json:"volumeClaimTemplates,omitempty"`
// VolumeClaimUpdateStrategy specifies the strategy for updating VolumeClaimTemplates within a StatefulSet.
// This field is currently only effective if the StatefulSetAutoResizePVCGate is enabled.
// +optional
VolumeClaimUpdateStrategy VolumeClaimUpdateStrategy `json:"volumeClaimUpdateStrategy,omitempty"`
// serviceName is the name of the service that governs this StatefulSet.
// This service must exist before the StatefulSet, and is responsible for
// the network identity of the set. Pods get DNS/hostnames that follow the
@ -214,7 +274,8 @@ type StatefulSetSpec struct {
// Then controller will delete Pod-1 and create Pod-3 (existing Pods will be [0, 2, 3])
// - If you just want to delete Pod-1, you should set spec.reserveOrdinal to [1] and spec.replicas to 2.
// Then controller will delete Pod-1 (existing Pods will be [0, 2])
ReserveOrdinals []int `json:"reserveOrdinals,omitempty"`
// You can also use ranges along with numbers, such as [1, 3-5], which is a shortcut for [1, 3, 4, 5].
ReserveOrdinals []intstr.IntOrString `json:"reserveOrdinals,omitempty"`
// Lifecycle defines the lifecycle hooks for Pods pre-delete, in-place update.
Lifecycle *appspub.Lifecycle `json:"lifecycle,omitempty"`
@ -228,6 +289,14 @@ type StatefulSetSpec struct {
// StatefulSetAutoDeletePVC feature gate to be enabled, which is alpha.
// +optional
PersistentVolumeClaimRetentionPolicy *StatefulSetPersistentVolumeClaimRetentionPolicy `json:"persistentVolumeClaimRetentionPolicy,omitempty"`
// ordinals controls the numbering of replica indices in a StatefulSet. The
// default ordinals behavior assigns a "0" index to the first replica and
// increments the index by one for each additional replica requested. Using
// the ordinals field requires the StatefulSetStartOrdinal feature gate to be
// enabled, which is beta.
// +optional
Ordinals *StatefulSetOrdinals `json:"ordinals,omitempty"`
}
// StatefulSetScaleStrategy defines strategies for pods scale.
@ -267,6 +336,10 @@ type StatefulSetStatus struct {
// updatedReadyReplicas is the number of updated Pods created by the StatefulSet controller that have a Ready Condition.
UpdatedReadyReplicas int32 `json:"updatedReadyReplicas,omitempty"`
// updatedAvailableReplicas is the number of updated Pods created by the StatefulSet controller that have a Ready condition
//for atleast minReadySeconds.
UpdatedAvailableReplicas int32 `json:"updatedAvailableReplicas,omitempty"`
// currentRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the
// sequence [0,currentReplicas).
CurrentRevision string `json:"currentRevision,omitempty"`
@ -289,6 +362,12 @@ type StatefulSetStatus struct {
// LabelSelector is label selectors for query over pods that should match the replica count used by HPA.
LabelSelector string `json:"labelSelector,omitempty"`
// VolumeClaims represents the status of compatibility between existing PVCs
// and their respective templates. It tracks whether the PersistentVolumeClaims have been updated
// to match any changes made to the volumeClaimTemplates, ensuring synchronization
// between the defined templates and the actual PersistentVolumeClaims in use.
VolumeClaims []VolumeClaimStatus `json:"volumeClaims,omitempty"`
}
// These are valid conditions of a statefulset.

View File

@ -1,5 +1,4 @@
//go:build !ignore_autogenerated
// +build !ignore_autogenerated
/*
Copyright 2021 The Kruise Authors.
@ -129,6 +128,21 @@ func (in *StatefulSetList) DeepCopyObject() runtime.Object {
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *StatefulSetOrdinals) DeepCopyInto(out *StatefulSetOrdinals) {
*out = *in
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StatefulSetOrdinals.
func (in *StatefulSetOrdinals) DeepCopy() *StatefulSetOrdinals {
if in == nil {
return nil
}
out := new(StatefulSetOrdinals)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *StatefulSetPersistentVolumeClaimRetentionPolicy) DeepCopyInto(out *StatefulSetPersistentVolumeClaimRetentionPolicy) {
*out = *in
@ -185,6 +199,7 @@ func (in *StatefulSetSpec) DeepCopyInto(out *StatefulSetSpec) {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
out.VolumeClaimUpdateStrategy = in.VolumeClaimUpdateStrategy
in.UpdateStrategy.DeepCopyInto(&out.UpdateStrategy)
if in.RevisionHistoryLimit != nil {
in, out := &in.RevisionHistoryLimit, &out.RevisionHistoryLimit
@ -193,7 +208,7 @@ func (in *StatefulSetSpec) DeepCopyInto(out *StatefulSetSpec) {
}
if in.ReserveOrdinals != nil {
in, out := &in.ReserveOrdinals, &out.ReserveOrdinals
*out = make([]int, len(*in))
*out = make([]intstr.IntOrString, len(*in))
copy(*out, *in)
}
if in.Lifecycle != nil {
@ -211,6 +226,11 @@ func (in *StatefulSetSpec) DeepCopyInto(out *StatefulSetSpec) {
*out = new(StatefulSetPersistentVolumeClaimRetentionPolicy)
**out = **in
}
if in.Ordinals != nil {
in, out := &in.Ordinals, &out.Ordinals
*out = new(StatefulSetOrdinals)
**out = **in
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StatefulSetSpec.
@ -238,6 +258,11 @@ func (in *StatefulSetStatus) DeepCopyInto(out *StatefulSetStatus) {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
if in.VolumeClaims != nil {
in, out := &in.VolumeClaims, &out.VolumeClaims
*out = make([]VolumeClaimStatus, len(*in))
copy(*out, *in)
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StatefulSetStatus.
@ -289,3 +314,33 @@ func (in *UnorderedUpdateStrategy) DeepCopy() *UnorderedUpdateStrategy {
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *VolumeClaimStatus) DeepCopyInto(out *VolumeClaimStatus) {
*out = *in
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeClaimStatus.
func (in *VolumeClaimStatus) DeepCopy() *VolumeClaimStatus {
if in == nil {
return nil
}
out := new(VolumeClaimStatus)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *VolumeClaimUpdateStrategy) DeepCopyInto(out *VolumeClaimUpdateStrategy) {
*out = *in
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeClaimUpdateStrategy.
func (in *VolumeClaimUpdateStrategy) DeepCopy() *VolumeClaimUpdateStrategy {
if in == nil {
return nil
}
out := new(VolumeClaimUpdateStrategy)
in.DeepCopyInto(out)
return out
}

View File

@ -27,17 +27,28 @@ import (
type PubOperation string
const (
// 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 the annotations do not exist, the default DELETE,EVICT,UPDATE are protected
// 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 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"
// pod webhook operation
PubUpdateOperation PubOperation = "UPDATE"
PubDeleteOperation PubOperation = "DELETE"
PubEvictOperation PubOperation = "EVICT"
// PubProtectTotalReplicas indicates the pub protected total replicas, rather than workload.spec.replicas.
// and must be used with pub.spec.selector.
PubProtectTotalReplicas = "pub.kruise.io/protect-total-replicas"
PubResizeOperation PubOperation = "RESIZE"
// 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
// implement scale subresources or Pod doesn't have workload management. In this scenario, you can set pub.kruise.io/protect-total-replicas
// in pub annotations to get the target replicas to realize the same effect of protection ability.
PubProtectTotalReplicasAnnotation = "pub.kruise.io/protect-total-replicas"
// Marked the pod will not be pub-protected, solving the scenario of force pod deletion
PodPubNoProtectionAnnotation = "pub.kruise.io/no-protect"
)

View File

@ -1,5 +1,4 @@
//go:build !ignore_autogenerated
// +build !ignore_autogenerated
/*
Copyright 2021 The Kruise Authors.

View File

@ -17,6 +17,10 @@ limitations under the License.
package main
import (
"os"
"k8s.io/kubernetes/pkg/credentialprovider/plugin"
"flag"
"math/rand"
"net/http"
@ -34,11 +38,22 @@ import (
"github.com/openkruise/kruise/pkg/daemon"
"github.com/openkruise/kruise/pkg/features"
utilfeature "github.com/openkruise/kruise/pkg/util/feature"
"github.com/openkruise/kruise/pkg/util/secret"
)
var (
bindAddr = flag.String("addr", ":10221", "The address the metric endpoint and healthz binds to.")
pprofAddr = flag.String("pprof-addr", ":10222", "The address the pprof binds to.")
bindAddr = flag.String("addr", ":10221", "The address the metric endpoint and healthz binds to.")
pprofAddr = flag.String("pprof-addr", ":10222", "The address the pprof binds to.")
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.")
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() {
@ -55,16 +70,32 @@ func main() {
if err := client.NewRegistry(cfg); err != nil {
klog.Fatalf("Failed to init clientset registry: %v", err)
}
go func() {
if err := http.ListenAndServe(*pprofAddr, nil); err != nil {
klog.Fatal(err, "unable to start pprof")
}
}()
if enablePprof != nil && *enablePprof {
go func() {
if err := http.ListenAndServe(*pprofAddr, nil); err != nil {
klog.Fatal(err, "unable to start pprof")
}
}()
}
ctx := signals.SetupSignalHandler()
d, err := daemon.NewDaemon(cfg, *bindAddr)
d, err := daemon.NewDaemon(cfg, *bindAddr, *maxWorkersForPullImage)
if err != nil {
klog.Fatalf("Failed to new daemon: %v", err)
}
if _, err := os.Stat(*pluginConfigFile); err == nil {
err = plugin.RegisterCredentialProviderPlugins(*pluginConfigFile, *pluginBinDir)
if err != nil {
klog.ErrorS(err, "Failed to register credential provider plugins")
}
} else if os.IsNotExist(err) {
klog.InfoS("No plugin config file found, skipping", "configFile", *pluginConfigFile)
} else {
klog.ErrorS(err, "Failed to check plugin config file")
}
// make sure the new docker key ring is made and set after the credential plugins are registered
secret.MakeAndSetKeyring()
if err := d.Run(ctx); err != nil {
klog.Fatalf("Failed to start daemon: %v", err)
}

67
cmd/helm_hook/main.go Normal file
View File

@ -0,0 +1,67 @@
/*
Copyright 2024 The Kruise Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package main
import (
"context"
"log"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/client-go/rest"
kruiseclientset "github.com/openkruise/kruise/pkg/client/clientset/versioned"
)
func main() {
config, err := rest.InClusterConfig()
if err != nil {
panic(err)
}
kc, err := kruiseclientset.NewForConfig(config)
if err != nil {
panic(err)
}
cloneSets, err := kc.AppsV1alpha1().CloneSets("").List(context.Background(), metav1.ListOptions{Limit: 1})
if err != nil {
panic(err)
}
if len(cloneSets.Items) > 0 || cloneSets.Continue != "" {
log.Fatalln("there still exists some clonesets in the cluster")
}
statefulSets, err := kc.AppsV1alpha1().StatefulSets("").List(context.Background(), metav1.ListOptions{Limit: 1})
if err != nil {
panic(err)
}
if len(statefulSets.Items) > 0 || statefulSets.Continue != "" {
log.Fatalln("there still exists some advanced statefulsets in the cluster")
}
statefulSetsBeta1, err := kc.AppsV1beta1().StatefulSets("").List(context.Background(), metav1.ListOptions{Limit: 1})
if err != nil {
panic(err)
}
if len(statefulSetsBeta1.Items) > 0 || statefulSetsBeta1.Continue != "" {
log.Fatalln("there still exists some advanced statefulsets in the cluster")
}
daemonSets, err := kc.AppsV1alpha1().DaemonSets("").List(context.Background(), metav1.ListOptions{Limit: 1})
if err != nil {
panic(err)
}
if len(daemonSets.Items) > 0 || daemonSets.Continue != "" {
log.Fatalln("there still exists some advanced daemonsets in the cluster")
}
log.Println("cluster is clean, ready to delete kruise")
}

View File

@ -1,11 +1,9 @@
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.7.0
creationTimestamp: null
controller-gen.kubebuilder.io/version: v0.16.5
name: advancedcronjobs.apps.kruise.io
spec:
group: apps.kruise.io
@ -44,14 +42,19 @@ spec:
description: AdvancedCronJob is the Schema for the advancedcronjobs API
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
description: |-
APIVersion defines the versioned schema of this representation of an object.
Servers should convert recognized schemas to the latest internal value, and
may reject unrecognized values.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
type: string
kind:
description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
description: |-
Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to.
Cannot be updated.
In CamelCase.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
type: string
metadata:
type: object
@ -59,19 +62,21 @@ spec:
description: AdvancedCronJobSpec defines the desired state of AdvancedCronJob
properties:
concurrencyPolicy:
description: 'Specifies how to treat concurrent executions of a Job.
Valid values are: - "Allow" (default): allows CronJobs to run concurrently;
- "Forbid": forbids concurrent runs, skipping next run if previous
run hasn''t finished yet; - "Replace": cancels currently running
job and replaces it with a new one'
description: |-
Specifies how to treat concurrent executions of a Job.
Valid values are:
- "Allow" (default): allows CronJobs to run concurrently;
- "Forbid": forbids concurrent runs, skipping next run if previous run hasn't finished yet;
- "Replace": cancels currently running job and replaces it with a new one
enum:
- Allow
- Forbid
- Replace
type: string
failedJobsHistoryLimit:
description: The number of failed finished jobs to retain. This is
a pointer to distinguish between explicit zero and not specified.
description: |-
The number of failed finished jobs to retain.
This is a pointer to distinguish between explicit zero and not specified.
format: int32
type: integer
paused:
@ -82,14 +87,15 @@ spec:
minLength: 0
type: string
startingDeadlineSeconds:
description: Optional deadline in seconds for starting the job if
it misses scheduled time for any reason. Missed jobs executions
will be counted as failed ones.
description: |-
Optional deadline in seconds for starting the job if it misses scheduled
time for any reason. Missed jobs executions will be counted as failed ones.
format: int64
type: integer
successfulJobsHistoryLimit:
description: The number of successful finished jobs to retain. This
is a pointer to distinguish between explicit zero and not specified.
description: |-
The number of successful finished jobs to retain.
This is a pointer to distinguish between explicit zero and not specified.
format: int32
type: integer
template:
@ -109,34 +115,34 @@ spec:
broadcastjob.
properties:
completionPolicy:
description: CompletionPolicy indicates the completion
policy of the job. Default is Always CompletionPolicyType.
description: |-
CompletionPolicy indicates the completion policy of the job.
Default is Always CompletionPolicyType.
properties:
activeDeadlineSeconds:
description: ActiveDeadlineSeconds specifies the duration
in seconds relative to the startTime that the job
may be active before the system tries to terminate
it; value must be positive integer. Only works for
Always type.
description: |-
ActiveDeadlineSeconds specifies the duration in seconds relative to the startTime that the job may be active
before the system tries to terminate it; value must be positive integer.
Only works for Always type.
format: int64
type: integer
ttlSecondsAfterFinished:
description: ttlSecondsAfterFinished limits the lifetime
of a Job that has finished execution (either Complete
or Failed). If this field is set, ttlSecondsAfterFinished
after the Job finishes, it is eligible to be automatically
deleted. When the Job is being deleted, its lifecycle
guarantees (e.g. finalizers) will be honored. If
this field is unset, the Job won't be automatically
deleted. If this field is set to zero, the Job becomes
eligible to be deleted immediately after it finishes.
This field is alpha-level and is only honored by
servers that enable the TTLAfterFinished feature.
description: |-
ttlSecondsAfterFinished limits the lifetime of a Job that has finished
execution (either Complete or Failed). If this field is set,
ttlSecondsAfterFinished after the Job finishes, it is eligible to be
automatically deleted. When the Job is being deleted, its lifecycle
guarantees (e.g. finalizers) will be honored. If this field is unset,
the Job won't be automatically deleted. If this field is set to zero,
the Job becomes eligible to be deleted immediately after it finishes.
This field is alpha-level and is only honored by servers that enable the
TTLAfterFinished feature.
Only works for Always type
format: int32
type: integer
type:
description: Type indicates the type of the CompletionPolicy.
description: |-
Type indicates the type of the CompletionPolicy.
Default is Always.
type: string
type: object
@ -150,7 +156,8 @@ spec:
format: int32
type: integer
type:
description: Type indicates the type of FailurePolicyType.
description: |-
Type indicates the type of FailurePolicyType.
Default is FailurePolicyTypeFailFast.
type: string
type: object
@ -158,12 +165,11 @@ spec:
anyOf:
- type: integer
- type: string
description: Parallelism specifies the maximum desired
number of pods the job should run at any given time.
The actual number of pods running in steady state will
be less than this number when the work left to do is
less than max parallelism. Not setting this value means
no limit.
description: |-
Parallelism specifies the maximum desired number of pods the job should
run at any given time. The actual number of pods running in steady state will
be less than this number when the work left to do is less than max parallelism.
Not setting this value means no limit.
x-kubernetes-int-or-string: true
paused:
description: Paused will pause the job.
@ -182,9 +188,9 @@ spec:
x-kubernetes-preserve-unknown-fields: true
type: object
timeZone:
description: The time zone name for the given schedule, see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones.
If not specified, this will default to the time zone of the kruise-controller-manager
process.
description: |-
The time zone name for the given schedule, see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones.
If not specified, this will default to the time zone of the kruise-controller-manager process.
type: string
required:
- schedule
@ -196,65 +202,49 @@ spec:
active:
description: A list of pointers to currently running jobs.
items:
description: 'ObjectReference contains enough information to let
you inspect or modify the referred object. --- New uses of this
type are discouraged because of difficulty describing its usage
when embedded in APIs. 1. Ignored fields. It includes many fields
which are not generally honored. For instance, ResourceVersion
and FieldPath are both very rarely valid in actual usage. 2.
Invalid usage help. It is impossible to add specific help for
individual usage. In most embedded usages, there are particular restrictions
like, "must refer only to types A and B" or "UID not honored"
or "name must be restricted". Those cannot be well described
when embedded. 3. Inconsistent validation. Because the usages
are different, the validation rules are different by usage, which
makes it hard for users to predict what will happen. 4. The fields
are both imprecise and overly precise. Kind is not a precise
mapping to a URL. This can produce ambiguity during interpretation
and require a REST mapping. In most cases, the dependency is
on the group,resource tuple and the version of the actual
struct is irrelevant. 5. We cannot easily change it. Because
this type is embedded in many locations, updates to this type will
affect numerous schemas. Don''t make new APIs embed an underspecified
API type they do not control. Instead of using this type, create
a locally provided and used type that is well-focused on your
reference. For example, ServiceReferences for admission registration:
https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533
.'
description: ObjectReference contains enough information to let
you inspect or modify the referred object.
properties:
apiVersion:
description: API version of the referent.
type: string
fieldPath:
description: 'If referring to a piece of an object instead of
an entire object, this string should contain a valid JSON/Go
field access statement, such as desiredState.manifest.containers[2].
For example, if the object reference is to a container within
a pod, this would take on a value like: "spec.containers{name}"
(where "name" refers to the name of the container that triggered
the event) or if no container name is specified "spec.containers[2]"
(container with index 2 in this pod). This syntax is chosen
only to have some well-defined way of referencing a part of
an object. TODO: this design is not final and this field is
subject to change in the future.'
description: |-
If referring to a piece of an object instead of an entire object, this string
should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2].
For example, if the object reference is to a container within a pod, this would take on a value like:
"spec.containers{name}" (where "name" refers to the name of the container that triggered
the event) or if no container name is specified "spec.containers[2]" (container with
index 2 in this pod). This syntax is chosen only to have some well-defined way of
referencing a part of an object.
type: string
kind:
description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
description: |-
Kind of the referent.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
type: string
name:
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
description: |-
Name of the referent.
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
type: string
namespace:
description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
description: |-
Namespace of the referent.
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/
type: string
resourceVersion:
description: 'Specific resourceVersion to which this reference
is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency'
description: |-
Specific resourceVersion to which this reference is made, if any.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency
type: string
uid:
description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids'
description: |-
UID of the referent.
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids
type: string
type: object
x-kubernetes-map-type: atomic
type: array
lastScheduleTime:
description: Information when was the last time the job was successfully
@ -269,9 +259,3 @@ spec:
storage: true
subresources:
status: {}
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []

View File

@ -1,11 +1,9 @@
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.7.0
creationTimestamp: null
controller-gen.kubebuilder.io/version: v0.16.5
name: broadcastjobs.apps.kruise.io
spec:
group: apps.kruise.io
@ -49,14 +47,19 @@ spec:
description: BroadcastJob is the Schema for the broadcastjobs API
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
description: |-
APIVersion defines the versioned schema of this representation of an object.
Servers should convert recognized schemas to the latest internal value, and
may reject unrecognized values.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
type: string
kind:
description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
description: |-
Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to.
Cannot be updated.
In CamelCase.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
type: string
metadata:
type: object
@ -64,31 +67,34 @@ spec:
description: BroadcastJobSpec defines the desired state of BroadcastJob
properties:
completionPolicy:
description: CompletionPolicy indicates the completion policy of the
job. Default is Always CompletionPolicyType.
description: |-
CompletionPolicy indicates the completion policy of the job.
Default is Always CompletionPolicyType.
properties:
activeDeadlineSeconds:
description: ActiveDeadlineSeconds specifies the duration in seconds
relative to the startTime that the job may be active before
the system tries to terminate it; value must be positive integer.
description: |-
ActiveDeadlineSeconds specifies the duration in seconds relative to the startTime that the job may be active
before the system tries to terminate it; value must be positive integer.
Only works for Always type.
format: int64
type: integer
ttlSecondsAfterFinished:
description: ttlSecondsAfterFinished limits the lifetime of a
Job that has finished execution (either Complete or Failed).
If this field is set, ttlSecondsAfterFinished after the Job
finishes, it is eligible to be automatically deleted. When the
Job is being deleted, its lifecycle guarantees (e.g. finalizers)
will be honored. If this field is unset, the Job won't be automatically
deleted. If this field is set to zero, the Job becomes eligible
to be deleted immediately after it finishes. This field is alpha-level
and is only honored by servers that enable the TTLAfterFinished
feature. Only works for Always type
description: |-
ttlSecondsAfterFinished limits the lifetime of a Job that has finished
execution (either Complete or Failed). If this field is set,
ttlSecondsAfterFinished after the Job finishes, it is eligible to be
automatically deleted. When the Job is being deleted, its lifecycle
guarantees (e.g. finalizers) will be honored. If this field is unset,
the Job won't be automatically deleted. If this field is set to zero,
the Job becomes eligible to be deleted immediately after it finishes.
This field is alpha-level and is only honored by servers that enable the
TTLAfterFinished feature.
Only works for Always type
format: int32
type: integer
type:
description: Type indicates the type of the CompletionPolicy.
description: |-
Type indicates the type of the CompletionPolicy.
Default is Always.
type: string
type: object
@ -102,19 +108,20 @@ spec:
format: int32
type: integer
type:
description: Type indicates the type of FailurePolicyType. Default
is FailurePolicyTypeFailFast.
description: |-
Type indicates the type of FailurePolicyType.
Default is FailurePolicyTypeFailFast.
type: string
type: object
parallelism:
anyOf:
- type: integer
- type: string
description: Parallelism specifies the maximum desired number of pods
the job should run at any given time. The actual number of pods
running in steady state will be less than this number when the work
left to do is less than max parallelism. Not setting this value
means no limit.
description: |-
Parallelism specifies the maximum desired number of pods the job should
run at any given time. The actual number of pods running in steady state will
be less than this number when the work left to do is less than max parallelism.
Not setting this value means no limit.
x-kubernetes-int-or-string: true
paused:
description: Paused will pause the job.
@ -134,8 +141,9 @@ spec:
format: int32
type: integer
completionTime:
description: Represents time when the job was completed. It is not
guaranteed to be set in happens-before order across separate operations.
description: |-
Represents time when the job was completed. It is not guaranteed to
be set in happens-before order across separate operations.
It is represented in RFC3339 form and is in UTC.
format: date-time
type: string
@ -185,10 +193,10 @@ spec:
description: The phase of the job.
type: string
startTime:
description: Represents time when the job was acknowledged by the
job controller. It is not guaranteed to be set in happens-before
order across separate operations. It is represented in RFC3339 form
and is in UTC.
description: |-
Represents time when the job was acknowledged by the job controller.
It is not guaranteed to be set in happens-before order across separate operations.
It is represented in RFC3339 form and is in UTC.
format: date-time
type: string
succeeded:
@ -201,9 +209,3 @@ spec:
storage: true
subresources:
status: {}
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []

View File

@ -1,11 +1,9 @@
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.7.0
creationTimestamp: null
controller-gen.kubebuilder.io/version: v0.16.5
name: clonesets.apps.kruise.io
spec:
group: apps.kruise.io
@ -31,6 +29,10 @@ spec:
jsonPath: .status.updatedReadyReplicas
name: UPDATED_READY
type: integer
- description: The number of pods updated and available.
jsonPath: .status.updatedAvailableReplicas
name: UPDATED_AVAILABLE
type: integer
- description: The number of pods ready.
jsonPath: .status.readyReplicas
name: READY
@ -67,14 +69,19 @@ spec:
description: CloneSet is the Schema for the clonesets API
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
description: |-
APIVersion defines the versioned schema of this representation of an object.
Servers should convert recognized schemas to the latest internal value, and
may reject unrecognized values.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
type: string
kind:
description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
description: |-
Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to.
Cannot be updated.
In CamelCase.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
type: string
metadata:
type: object
@ -98,12 +105,12 @@ spec:
type: string
type: object
markPodNotReady:
description: 'MarkPodNotReady = true means: - Pod will be
set to ''NotReady'' at preparingDelete/preparingUpdate state.
- Pod will be restored to ''Ready'' at Updated state if
it was set to ''NotReady'' at preparingUpdate state. Currently,
MarkPodNotReady only takes effect on InPlaceUpdate & PreDelete
hook. Default to false.'
description: |-
MarkPodNotReady = true means:
- Pod will be set to 'NotReady' at preparingDelete/preparingUpdate state.
- Pod will be restored to 'Ready' at Updated state if it was set to 'NotReady' at preparingUpdate state.
Currently, MarkPodNotReady only takes effect on InPlaceUpdate & PreDelete hook.
Default to false.
type: boolean
type: object
preDelete:
@ -118,12 +125,12 @@ spec:
type: string
type: object
markPodNotReady:
description: 'MarkPodNotReady = true means: - Pod will be
set to ''NotReady'' at preparingDelete/preparingUpdate state.
- Pod will be restored to ''Ready'' at Updated state if
it was set to ''NotReady'' at preparingUpdate state. Currently,
MarkPodNotReady only takes effect on InPlaceUpdate & PreDelete
hook. Default to false.'
description: |-
MarkPodNotReady = true means:
- Pod will be set to 'NotReady' at preparingDelete/preparingUpdate state.
- Pod will be restored to 'Ready' at Updated state if it was set to 'NotReady' at preparingUpdate state.
Currently, MarkPodNotReady only takes effect on InPlaceUpdate & PreDelete hook.
Default to false.
type: boolean
type: object
preNormal:
@ -139,123 +146,131 @@ spec:
type: string
type: object
markPodNotReady:
description: 'MarkPodNotReady = true means: - Pod will be
set to ''NotReady'' at preparingDelete/preparingUpdate state.
- Pod will be restored to ''Ready'' at Updated state if
it was set to ''NotReady'' at preparingUpdate state. Currently,
MarkPodNotReady only takes effect on InPlaceUpdate & PreDelete
hook. Default to false.'
description: |-
MarkPodNotReady = true means:
- Pod will be set to 'NotReady' at preparingDelete/preparingUpdate state.
- Pod will be restored to 'Ready' at Updated state if it was set to 'NotReady' at preparingUpdate state.
Currently, MarkPodNotReady only takes effect on InPlaceUpdate & PreDelete hook.
Default to false.
type: boolean
type: object
type: object
minReadySeconds:
description: Minimum number of seconds for which a newly created pod
should be ready without any of its container crashing, for it to
be considered available. Defaults to 0 (pod will be considered available
as soon as it is ready)
description: |-
Minimum number of seconds for which a newly created pod should be ready
without any of its container crashing, for it to be considered available.
Defaults to 0 (pod will be considered available as soon as it is ready)
format: int32
type: integer
replicas:
description: Replicas is the desired number of replicas of the given
Template. These are replicas in the sense that they are instantiations
of the same Template. If unspecified, defaults to 1.
description: |-
Replicas is the desired number of replicas of the given Template.
These are replicas in the sense that they are instantiations of the
same Template.
If unspecified, defaults to 1.
format: int32
type: integer
revisionHistoryLimit:
description: RevisionHistoryLimit is the maximum number of revisions
that will be maintained in the CloneSet's revision history. The
revision history consists of all revisions not represented by a
currently applied CloneSetSpec version. The default value is 10.
description: |-
RevisionHistoryLimit is the maximum number of revisions that will
be maintained in the CloneSet's revision history. The revision history
consists of all revisions not represented by a currently applied
CloneSetSpec version. The default value is 10.
format: int32
type: integer
scaleStrategy:
description: ScaleStrategy indicates the ScaleStrategy that will be
employed to create and delete Pods in the CloneSet.
description: |-
ScaleStrategy indicates the ScaleStrategy that will be employed to
create and delete Pods in the CloneSet.
properties:
disablePVCReuse:
description: Indicate if cloneSet will reuse already existed pvc
to rebuild a new pod
description: |-
Indicate if cloneSet will reuse already existed pvc to
rebuild a new pod
type: boolean
maxUnavailable:
anyOf:
- type: integer
- type: string
description: The maximum number of pods that can be unavailable
for scaled pods. This field can control the changes rate of
replicas for CloneSet so as to minimize the impact for users'
service. The scale will fail if the number of unavailable pods
were greater than this MaxUnavailable at scaling up. MaxUnavailable
works only when scaling up.
description: |-
The maximum number of pods that can be unavailable for scaled pods.
This field can control the changes rate of replicas for CloneSet so as to minimize the impact for users' service.
The scale will fail if the number of unavailable pods were greater than this MaxUnavailable at scaling up.
MaxUnavailable works only when scaling up.
x-kubernetes-int-or-string: true
podsToDelete:
description: PodsToDelete is the names of Pod should be deleted.
description: |-
PodsToDelete is the names of Pod should be deleted.
Note that this list will be truncated for non-existing pod names.
items:
type: string
type: array
type: object
selector:
description: 'Selector is a label query over pods that should match
the replica count. It must match the pod template''s labels. More
info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors'
description: |-
Selector is a label query over pods that should match the replica count.
It must match the pod template's labels.
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
properties:
matchExpressions:
description: matchExpressions is a list of label selector requirements.
The requirements are ANDed.
items:
description: A label selector requirement is a selector that
contains values, a key, and an operator that relates the key
and values.
description: |-
A label selector requirement is a selector that contains values, a key, and an operator that
relates the key and values.
properties:
key:
description: key is the label key that the selector applies
to.
type: string
operator:
description: operator represents a key's relationship to
a set of values. Valid operators are In, NotIn, Exists
and DoesNotExist.
description: |-
operator represents a key's relationship to a set of values.
Valid operators are In, NotIn, Exists and DoesNotExist.
type: string
values:
description: values is an array of string values. If the
operator is In or NotIn, the values array must be non-empty.
If the operator is Exists or DoesNotExist, the values
array must be empty. This array is replaced during a strategic
description: |-
values is an array of string values. If the operator is In or NotIn,
the values array must be non-empty. If the operator is Exists or DoesNotExist,
the values array must be empty. This array is replaced during a strategic
merge patch.
items:
type: string
type: array
x-kubernetes-list-type: atomic
required:
- key
- operator
type: object
type: array
x-kubernetes-list-type: atomic
matchLabels:
additionalProperties:
type: string
description: matchLabels is a map of {key,value} pairs. A single
{key,value} in the matchLabels map is equivalent to an element
of matchExpressions, whose key field is "key", the operator
is "In", and the values array contains only "value". The requirements
are ANDed.
description: |-
matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
map is equivalent to an element of matchExpressions, whose key field is "key", the
operator is "In", and the values array contains only "value". The requirements are ANDed.
type: object
type: object
x-kubernetes-map-type: atomic
template:
description: Template describes the pods that will be created.
x-kubernetes-preserve-unknown-fields: true
updateStrategy:
description: UpdateStrategy indicates the UpdateStrategy that will
be employed to update Pods in the CloneSet when a revision is made
to Template.
description: |-
UpdateStrategy indicates the UpdateStrategy that will be employed to
update Pods in the CloneSet when a revision is made to Template.
properties:
inPlaceUpdateStrategy:
description: InPlaceUpdateStrategy contains strategies for in-place
update.
properties:
gracePeriodSeconds:
description: GracePeriodSeconds is the timespan between set
Pod status to not-ready and update images in Pod spec when
in-place update a Pod.
description: |-
GracePeriodSeconds is the timespan between set Pod status to not-ready and update images in Pod spec
when in-place update a Pod.
format: int32
type: integer
type: object
@ -263,59 +278,64 @@ spec:
anyOf:
- type: integer
- type: string
description: 'The maximum number of pods that can be scheduled
above the desired replicas during update or specified delete.
Value can be an absolute number (ex: 5) or a percentage of desired
pods (ex: 10%). Absolute number is calculated from percentage
by rounding up. Defaults to 0.'
description: |-
The maximum number of pods that can be scheduled above the desired replicas during update or specified delete.
Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%).
Absolute number is calculated from percentage by rounding up.
Defaults to 0.
x-kubernetes-int-or-string: true
maxUnavailable:
anyOf:
- type: integer
- type: string
description: 'The maximum number of pods that can be unavailable
during update or scale. Value can be an absolute number (ex:
5) or a percentage of desired pods (ex: 10%). Absolute number
is calculated from percentage by rounding up by default. When
maxSurge > 0, absolute number is calculated from percentage
by rounding down. Defaults to 20%.'
description: |-
The maximum number of pods that can be unavailable during update or scale.
Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%).
Absolute number is calculated from percentage by rounding up by default.
When maxSurge > 0, absolute number is calculated from percentage by rounding down.
Defaults to 20%.
x-kubernetes-int-or-string: true
partition:
anyOf:
- type: integer
- type: string
description: 'Partition is the desired number of pods in old revisions.
Value can be an absolute number (ex: 5) or a percentage of desired
pods (ex: 10%). Absolute number is calculated from percentage
by rounding up by default. It means when partition is set during
pods updating, (replicas - partition value) number of pods will
be updated. Default value is 0.'
description: |-
Partition is the desired number of pods in old revisions.
Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%).
Absolute number is calculated from percentage by rounding up by default.
It means when partition is set during pods updating, (replicas - partition value) number of pods will be updated.
Default value is 0.
x-kubernetes-int-or-string: true
paused:
description: Paused indicates that the CloneSet is paused. Default
value is false
description: |-
Paused indicates that the CloneSet is paused.
Default value is false
type: boolean
priorityStrategy:
description: Priorities are the rules for calculating the priority
of updating pods. Each pod to be updated, will pass through
these terms and get a sum of weights.
description: |-
Priorities are the rules for calculating the priority of updating pods.
Each pod to be updated, will pass through these terms and get a sum of weights.
properties:
orderPriority:
description: 'Order priority terms, pods will be sorted by
the value of orderedKey. For example: ``` orderPriority:
- orderedKey: key1 - orderedKey: key2 ``` First, all pods
which have key1 in labels will be sorted by the value of
key1. Then, the left pods which have no key1 but have key2
in labels will be sorted by the value of key2 and put behind
those pods have key1.'
description: |-
Order priority terms, pods will be sorted by the value of orderedKey.
For example:
```
orderPriority:
- orderedKey: key1
- orderedKey: key2
```
First, all pods which have key1 in labels will be sorted by the value of key1.
Then, the left pods which have no key1 but have key2 in labels will be sorted by
the value of key2 and put behind those pods have key1.
items:
description: UpdatePriorityOrderTerm defines order priority.
properties:
orderedKey:
description: Calculate priority by value of this key.
Values of this key, will be sorted by GetInt(val).
GetInt method will find the last int in value, such
as getting 5 in value '5', getting 10 in value 'sts-10'.
description: |-
Calculate priority by value of this key.
Values of this key, will be sorted by GetInt(val). GetInt method will find the last int in value,
such as getting 5 in value '5', getting 10 in value 'sts-10'.
type: string
required:
- orderedKey
@ -335,45 +355,45 @@ spec:
description: matchExpressions is a list of label
selector requirements. The requirements are ANDed.
items:
description: A label selector requirement is a
selector that contains values, a key, and an
operator that relates the key and values.
description: |-
A label selector requirement is a selector that contains values, a key, and an operator that
relates the key and values.
properties:
key:
description: key is the label key that the
selector applies to.
type: string
operator:
description: operator represents a key's relationship
to a set of values. Valid operators are
In, NotIn, Exists and DoesNotExist.
description: |-
operator represents a key's relationship to a set of values.
Valid operators are In, NotIn, Exists and DoesNotExist.
type: string
values:
description: values is an array of string
values. If the operator is In or NotIn,
the values array must be non-empty. If the
operator is Exists or DoesNotExist, the
values array must be empty. This array is
replaced during a strategic merge patch.
description: |-
values is an array of string values. If the operator is In or NotIn,
the values array must be non-empty. If the operator is Exists or DoesNotExist,
the values array must be empty. This array is replaced during a strategic
merge patch.
items:
type: string
type: array
x-kubernetes-list-type: atomic
required:
- key
- operator
type: object
type: array
x-kubernetes-list-type: atomic
matchLabels:
additionalProperties:
type: string
description: matchLabels is a map of {key,value}
pairs. A single {key,value} in the matchLabels
map is equivalent to an element of matchExpressions,
whose key field is "key", the operator is "In",
and the values array contains only "value". The
requirements are ANDed.
description: |-
matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
map is equivalent to an element of matchExpressions, whose key field is "key", the
operator is "In", and the values array contains only "value". The requirements are ANDed.
type: object
type: object
x-kubernetes-map-type: atomic
weight:
description: Weight associated with matching the corresponding
matchExpressions, in the range 1-100.
@ -386,14 +406,11 @@ spec:
type: array
type: object
scatterStrategy:
description: ScatterStrategy defines the scatter rules to make
pods been scattered when update. This will avoid pods with the
same key-value to be updated in one batch. - Note that pods
will be scattered after priority sort. So, although priority
strategy and scatter strategy can be applied together, we suggest
to use either one of them. - If scatterStrategy is used, we
suggest to just use one term. Otherwise, the update order can
be hard to understand.
description: |-
ScatterStrategy defines the scatter rules to make pods been scattered when update.
This will avoid pods with the same key-value to be updated in one batch.
- Note that pods will be scattered after priority sort. So, although priority strategy and scatter strategy can be applied together, we suggest to use either one of them.
- If scatterStrategy is used, we suggest to just use one term. Otherwise, the update order can be hard to understand.
items:
properties:
key:
@ -406,14 +423,15 @@ spec:
type: object
type: array
type:
description: Type indicates the type of the CloneSetUpdateStrategy.
description: |-
Type indicates the type of the CloneSetUpdateStrategy.
Default is ReCreate.
type: string
type: object
volumeClaimTemplates:
description: VolumeClaimTemplates is a list of claims that pods are
allowed to reference. Note that PVC will be deleted when its pod
has been deleted.
description: |-
VolumeClaimTemplates is a list of claims that pods are allowed to reference.
Note that PVC will be deleted when its pod has been deleted.
x-kubernetes-preserve-unknown-fields: true
required:
- selector
@ -428,10 +446,10 @@ spec:
format: int32
type: integer
collisionCount:
description: CollisionCount is the count of hash collisions for the
CloneSet. The CloneSet controller uses this field as a collision
avoidance mechanism when it needs to create the name for the newest
ControllerRevision.
description: |-
CollisionCount is the count of hash collisions for the CloneSet. The CloneSet controller
uses this field as a collision avoidance mechanism when it needs to create the name for the
newest ControllerRevision.
format: int32
type: integer
conditions:
@ -469,9 +487,9 @@ spec:
revision version of the CloneSet.
type: string
expectedUpdatedReplicas:
description: ExpectedUpdatedReplicas is the number of Pods that should
be updated by CloneSet controller. This field is calculated via
Replicas - Partition.
description: |-
ExpectedUpdatedReplicas is the number of Pods that should be updated by CloneSet controller.
This field is calculated via Replicas - Partition.
format: int32
type: integer
labelSelector:
@ -479,9 +497,9 @@ spec:
that should match the replica count used by HPA.
type: string
observedGeneration:
description: ObservedGeneration is the most recent generation observed
for this CloneSet. It corresponds to the CloneSet's generation,
which is updated on mutation by the API Server.
description: |-
ObservedGeneration is the most recent generation observed for this CloneSet. It corresponds to the
CloneSet's generation, which is updated on mutation by the API Server.
format: int64
type: integer
readyReplicas:
@ -498,15 +516,24 @@ spec:
description: UpdateRevision, if not empty, indicates the latest revision
of the CloneSet.
type: string
updatedAvailableReplicas:
description: |-
UpdatedAvailableReplicas is the number of Pods created by the CloneSet controller from the CloneSet version
indicated by updateRevision and have a Ready Condition for at least minReadySeconds.
Notice: when enable InPlaceWorkloadVerticalScaling, pod during resource resizing will also be unavailable.
This means these pod will be counted in maxUnavailable.
format: int32
type: integer
updatedReadyReplicas:
description: UpdatedReadyReplicas is the number of Pods created by
the CloneSet controller from the CloneSet version indicated by updateRevision
and have a Ready Condition.
description: |-
UpdatedReadyReplicas is the number of Pods created by the CloneSet controller from the CloneSet version
indicated by updateRevision and have a Ready Condition.
format: int32
type: integer
updatedReplicas:
description: UpdatedReplicas is the number of Pods created by the
CloneSet controller from the CloneSet version indicated by updateRevision.
description: |-
UpdatedReplicas is the number of Pods created by the CloneSet controller from the CloneSet version
indicated by updateRevision.
format: int32
type: integer
required:
@ -525,9 +552,3 @@ spec:
specReplicasPath: .spec.replicas
statusReplicasPath: .status.replicas
status: {}
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []

View File

@ -1,11 +1,9 @@
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.7.0
creationTimestamp: null
controller-gen.kubebuilder.io/version: v0.16.5
name: containerrecreaterequests.apps.kruise.io
spec:
group: apps.kruise.io
@ -45,14 +43,19 @@ spec:
API
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
description: |-
APIVersion defines the versioned schema of this representation of an object.
Servers should convert recognized schemas to the latest internal value, and
may reject unrecognized values.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
type: string
kind:
description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
description: |-
Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to.
Cannot be updated.
In CamelCase.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
type: string
metadata:
type: object
@ -73,41 +76,46 @@ spec:
that need to recreate.
properties:
name:
description: Name of the container that need to recreate. It
must be existing in the real pod.Spec.Containers.
description: |-
Name of the container that need to recreate.
It must be existing in the real pod.Spec.Containers.
type: string
ports:
description: Ports is synced from the real container in Pod
spec during this ContainerRecreateRequest creating. Populated
by the system. Read-only.
description: |-
Ports is synced from the real container in Pod spec during this ContainerRecreateRequest creating.
Populated by the system.
Read-only.
items:
description: ContainerPort represents a network port in a
single container.
properties:
containerPort:
description: Number of port to expose on the pod's IP
address. This must be a valid port number, 0 < x < 65536.
description: |-
Number of port to expose on the pod's IP address.
This must be a valid port number, 0 < x < 65536.
format: int32
type: integer
hostIP:
description: What host IP to bind the external port to.
type: string
hostPort:
description: Number of port to expose on the host. If
specified, this must be a valid port number, 0 < x <
65536. If HostNetwork is specified, this must match
ContainerPort. Most containers do not need this.
description: |-
Number of port to expose on the host.
If specified, this must be a valid port number, 0 < x < 65536.
If HostNetwork is specified, this must match ContainerPort.
Most containers do not need this.
format: int32
type: integer
name:
description: If specified, this must be an IANA_SVC_NAME
and unique within the pod. Each named port in a pod
must have a unique name. Name for the port that can
be referred to by services.
description: |-
If specified, this must be an IANA_SVC_NAME and unique within the pod. Each
named port in a pod must have a unique name. Name for the port that can be
referred to by services.
type: string
protocol:
default: TCP
description: Protocol for port. Must be UDP, TCP, or SCTP.
description: |-
Protocol for port. Must be UDP, TCP, or SCTP.
Defaults to "TCP".
type: string
required:
@ -115,34 +123,35 @@ spec:
type: object
type: array
preStop:
description: PreStop is synced from the real container in Pod
spec during this ContainerRecreateRequest creating. Populated
by the system. Read-only.
description: |-
PreStop is synced from the real container in Pod spec during this ContainerRecreateRequest creating.
Populated by the system.
Read-only.
properties:
exec:
description: One and only one of the following should be
specified. Exec specifies the action to take.
description: |-
One and only one of the following should be specified.
Exec specifies the action to take.
properties:
command:
description: Command is the command line to execute
inside the container, the working directory for the
command is root ('/') in the container's filesystem.
The command is simply exec'd, it is not run inside
a shell, so traditional shell instructions ('|', etc)
won't work. To use a shell, you need to explicitly
call out to that shell. Exit status of 0 is treated
as live/healthy and non-zero is unhealthy.
description: |-
Command is the command line to execute inside the container, the working directory for the
command is root ('/') in the container's filesystem. The command is simply exec'd, it is
not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use
a shell, you need to explicitly call out to that shell.
Exit status of 0 is treated as live/healthy and non-zero is unhealthy.
items:
type: string
type: array
x-kubernetes-list-type: atomic
type: object
httpGet:
description: HTTPGet specifies the http request to perform.
properties:
host:
description: Host name to connect to, defaults to the
pod IP. You probably want to set "Host" in httpHeaders
instead.
description: |-
Host name to connect to, defaults to the pod IP. You probably want to set
"Host" in httpHeaders instead.
type: string
httpHeaders:
description: Custom headers to set in the request. HTTP
@ -152,7 +161,9 @@ spec:
to be used in HTTP probes
properties:
name:
description: The header field name
description: |-
The header field name.
This will be canonicalized upon output, so case-variant names will be understood as the same header.
type: string
value:
description: The header field value
@ -162,6 +173,7 @@ spec:
- value
type: object
type: array
x-kubernetes-list-type: atomic
path:
description: Path to access on the HTTP server.
type: string
@ -169,21 +181,23 @@ spec:
anyOf:
- type: integer
- type: string
description: Name or number of the port to access on
the container. Number must be in the range 1 to 65535.
description: |-
Name or number of the port to access on the container.
Number must be in the range 1 to 65535.
Name must be an IANA_SVC_NAME.
x-kubernetes-int-or-string: true
scheme:
description: Scheme to use for connecting to the host.
description: |-
Scheme to use for connecting to the host.
Defaults to HTTP.
type: string
required:
- port
type: object
tcpSocket:
description: 'TCPSocket specifies an action involving a
TCP port. TCP hooks not yet supported TODO: implement
a realistic TCP lifecycle hook'
description: |-
TCPSocket specifies an action involving a TCP port.
TCP hooks not yet supported
properties:
host:
description: 'Optional: Host name to connect to, defaults
@ -193,8 +207,9 @@ spec:
anyOf:
- type: integer
- type: string
description: Number or name of the port to access on
the container. Number must be in the range 1 to 65535.
description: |-
Number or name of the port to access on the container.
Number must be in the range 1 to 65535.
Name must be an IANA_SVC_NAME.
x-kubernetes-int-or-string: true
required:
@ -202,20 +217,20 @@ spec:
type: object
type: object
statusContext:
description: StatusContext is synced from the real Pod status
during this ContainerRecreateRequest creating. Populated by
the system. Read-only.
description: |-
StatusContext is synced from the real Pod status during this ContainerRecreateRequest creating.
Populated by the system.
Read-only.
properties:
containerID:
description: Container's ID in the format 'docker://<container_id>'.
type: string
restartCount:
description: The number of times the container has been
restarted, currently based on the number of dead containers
that have not yet been removed. Note that this is calculated
from dead containers. But those containers are subject
to garbage collection. This value will get capped at 5
by GC.
description: |-
The number of times the container has been restarted, currently based on
the number of dead containers that have not yet been removed.
Note that this is calculated from dead containers. But those containers are subject to
garbage collection. This value will get capped at 5 by GC.
format: int32
type: integer
required:
@ -241,10 +256,10 @@ spec:
container even if the previous container is starting.
type: boolean
minStartedSeconds:
description: Minimum number of seconds for which a newly created
container should be started and ready without any of its container
crashing, for it to be considered Succeeded. Defaults to 0 (container
will be considered Succeeded as soon as it is started and ready)
description: |-
Minimum number of seconds for which a newly created container should be started and ready
without any of its container crashing, for it to be considered Succeeded.
Defaults to 0 (container will be considered Succeeded as soon as it is started and ready)
format: int32
type: integer
orderedRecreate:
@ -252,16 +267,15 @@ spec:
next container only if the previous one has recreated completely.
type: boolean
terminationGracePeriodSeconds:
description: TerminationGracePeriodSeconds is the optional duration
in seconds to wait the container terminating gracefully. Value
must be non-negative integer. The value zero indicates delete
immediately. If this value is nil, we will use pod.Spec.TerminationGracePeriodSeconds
as default value.
description: |-
TerminationGracePeriodSeconds is the optional duration in seconds to wait the container terminating gracefully.
Value must be non-negative integer. The value zero indicates delete immediately.
If this value is nil, we will use pod.Spec.TerminationGracePeriodSeconds as default value.
format: int64
type: integer
unreadyGracePeriodSeconds:
description: UnreadyGracePeriodSeconds is the optional duration
in seconds to mark Pod as not ready over this duration before
description: |-
UnreadyGracePeriodSeconds is the optional duration in seconds to mark Pod as not ready over this duration before
executing preStop hook and stopping the container.
format: int64
type: integer
@ -280,10 +294,10 @@ spec:
of ContainerRecreateRequest
properties:
completionTime:
description: Represents time when the ContainerRecreateRequest was
completed. It is not guaranteed to be set in happens-before order
across separate operations. It is represented in RFC3339 form and
is in UTC.
description: |-
Represents time when the ContainerRecreateRequest was completed. It is not guaranteed to
be set in happens-before order across separate operations.
It is represented in RFC3339 form and is in UTC.
format: date-time
type: string
containerRecreateStates:
@ -327,9 +341,3 @@ spec:
storage: true
subresources:
status: {}
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []

View File

@ -1,11 +1,9 @@
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.7.0
creationTimestamp: null
controller-gen.kubebuilder.io/version: v0.16.5
name: daemonsets.apps.kruise.io
spec:
group: apps.kruise.io
@ -63,14 +61,19 @@ spec:
description: DaemonSet is the Schema for the daemonsets API
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
description: |-
APIVersion defines the versioned schema of this representation of an object.
Servers should convert recognized schemas to the latest internal value, and
may reject unrecognized values.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
type: string
kind:
description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
description: |-
Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to.
Cannot be updated.
In CamelCase.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
type: string
metadata:
type: object
@ -81,13 +84,14 @@ spec:
anyOf:
- type: integer
- type: string
description: BurstReplicas is a rate limiter for booting pods on a
lot of pods. The default value is 250
description: |-
BurstReplicas is a rate limiter for booting pods on a lot of pods.
The default value is 250
x-kubernetes-int-or-string: true
lifecycle:
description: Lifecycle defines the lifecycle hooks for Pods pre-delete,
in-place update. Currently, we only support pre-delete hook for
Advanced DaemonSet.
description: |-
Lifecycle defines the lifecycle hooks for Pods pre-delete, in-place update.
Currently, we only support pre-delete hook for Advanced DaemonSet.
properties:
inPlaceUpdate:
description: InPlaceUpdate is the hook before Pod to update and
@ -102,12 +106,12 @@ spec:
type: string
type: object
markPodNotReady:
description: 'MarkPodNotReady = true means: - Pod will be
set to ''NotReady'' at preparingDelete/preparingUpdate state.
- Pod will be restored to ''Ready'' at Updated state if
it was set to ''NotReady'' at preparingUpdate state. Currently,
MarkPodNotReady only takes effect on InPlaceUpdate & PreDelete
hook. Default to false.'
description: |-
MarkPodNotReady = true means:
- Pod will be set to 'NotReady' at preparingDelete/preparingUpdate state.
- Pod will be restored to 'Ready' at Updated state if it was set to 'NotReady' at preparingUpdate state.
Currently, MarkPodNotReady only takes effect on InPlaceUpdate & PreDelete hook.
Default to false.
type: boolean
type: object
preDelete:
@ -122,12 +126,12 @@ spec:
type: string
type: object
markPodNotReady:
description: 'MarkPodNotReady = true means: - Pod will be
set to ''NotReady'' at preparingDelete/preparingUpdate state.
- Pod will be restored to ''Ready'' at Updated state if
it was set to ''NotReady'' at preparingUpdate state. Currently,
MarkPodNotReady only takes effect on InPlaceUpdate & PreDelete
hook. Default to false.'
description: |-
MarkPodNotReady = true means:
- Pod will be set to 'NotReady' at preparingDelete/preparingUpdate state.
- Pod will be restored to 'Ready' at Updated state if it was set to 'NotReady' at preparingUpdate state.
Currently, MarkPodNotReady only takes effect on InPlaceUpdate & PreDelete hook.
Default to false.
type: boolean
type: object
preNormal:
@ -143,79 +147,87 @@ spec:
type: string
type: object
markPodNotReady:
description: 'MarkPodNotReady = true means: - Pod will be
set to ''NotReady'' at preparingDelete/preparingUpdate state.
- Pod will be restored to ''Ready'' at Updated state if
it was set to ''NotReady'' at preparingUpdate state. Currently,
MarkPodNotReady only takes effect on InPlaceUpdate & PreDelete
hook. Default to false.'
description: |-
MarkPodNotReady = true means:
- Pod will be set to 'NotReady' at preparingDelete/preparingUpdate state.
- Pod will be restored to 'Ready' at Updated state if it was set to 'NotReady' at preparingUpdate state.
Currently, MarkPodNotReady only takes effect on InPlaceUpdate & PreDelete hook.
Default to false.
type: boolean
type: object
type: object
minReadySeconds:
description: The minimum number of seconds for which a newly created
DaemonSet pod should be ready without any of its container crashing,
for it to be considered available. Defaults to 0 (pod will be considered
available as soon as it is ready).
description: |-
The minimum number of seconds for which a newly created DaemonSet pod should
be ready without any of its container crashing, for it to be considered
available. Defaults to 0 (pod will be considered available as soon as it
is ready).
format: int32
type: integer
revisionHistoryLimit:
description: The number of old history to retain to allow rollback.
description: |-
The number of old history to retain to allow rollback.
This is a pointer to distinguish between explicit zero and not specified.
Defaults to 10.
format: int32
type: integer
selector:
description: 'A label query over pods that are managed by the daemon
set. Must match in order to be controlled. It must match the pod
template''s labels. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors'
description: |-
A label query over pods that are managed by the daemon set.
Must match in order to be controlled.
It must match the pod template's labels.
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
properties:
matchExpressions:
description: matchExpressions is a list of label selector requirements.
The requirements are ANDed.
items:
description: A label selector requirement is a selector that
contains values, a key, and an operator that relates the key
and values.
description: |-
A label selector requirement is a selector that contains values, a key, and an operator that
relates the key and values.
properties:
key:
description: key is the label key that the selector applies
to.
type: string
operator:
description: operator represents a key's relationship to
a set of values. Valid operators are In, NotIn, Exists
and DoesNotExist.
description: |-
operator represents a key's relationship to a set of values.
Valid operators are In, NotIn, Exists and DoesNotExist.
type: string
values:
description: values is an array of string values. If the
operator is In or NotIn, the values array must be non-empty.
If the operator is Exists or DoesNotExist, the values
array must be empty. This array is replaced during a strategic
description: |-
values is an array of string values. If the operator is In or NotIn,
the values array must be non-empty. If the operator is Exists or DoesNotExist,
the values array must be empty. This array is replaced during a strategic
merge patch.
items:
type: string
type: array
x-kubernetes-list-type: atomic
required:
- key
- operator
type: object
type: array
x-kubernetes-list-type: atomic
matchLabels:
additionalProperties:
type: string
description: matchLabels is a map of {key,value} pairs. A single
{key,value} in the matchLabels map is equivalent to an element
of matchExpressions, whose key field is "key", the operator
is "In", and the values array contains only "value". The requirements
are ANDed.
description: |-
matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
map is equivalent to an element of matchExpressions, whose key field is "key", the
operator is "In", and the values array contains only "value". The requirements are ANDed.
type: object
type: object
x-kubernetes-map-type: atomic
template:
description: 'An object that describes the pod that will be created.
The DaemonSet will create exactly one copy of this pod on every
node that matches the template''s node selector (or on every node
if no node selector is specified). More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template'
description: |-
An object that describes the pod that will be created.
The DaemonSet will create exactly one copy of this pod on every node
that matches the template's node selector (or on every node if no node
selector is specified).
More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template
x-kubernetes-preserve-unknown-fields: true
updateStrategy:
description: An update strategy to replace existing DaemonSet pods
@ -229,74 +241,74 @@ spec:
anyOf:
- type: integer
- type: string
description: 'The maximum number of nodes with an existing
available DaemonSet pod that can have an updated DaemonSet
pod during during an update. Value can be an absolute number
(ex: 5) or a percentage of desired pods (ex: 10%). This
can not be 0 if MaxUnavailable is 0. Absolute number is
calculated from percentage by rounding up to a minimum of
1. Default value is 0. Example: when this is set to 30%,
at most 30% of the total number of nodes that should be
running the daemon pod (i.e. status.desiredNumberScheduled)
can have their a new pod created before the old pod is marked
as deleted. The update starts by launching new pods on 30%
of nodes. Once an updated pod is available (Ready for at
least minReadySeconds) the old DaemonSet pod on that node
is marked deleted. If the old pod becomes unavailable for
any reason (Ready transitions to false, is evicted, or is
drained) an updated pod is immediatedly created on that
node without considering surge limits. Allowing surge implies
the possibility that the resources consumed by the daemonset
on any given node can double if the readiness check fails,
and so resource intensive daemonsets should take into account
that they may cause evictions during disruption. This is
beta field and enabled/disabled by DaemonSetUpdateSurge
feature gate.'
description: |-
The maximum number of nodes with an existing available DaemonSet pod that
can have an updated DaemonSet pod during during an update.
Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%).
This can not be 0 if MaxUnavailable is 0.
Absolute number is calculated from percentage by rounding up to a minimum of 1.
Default value is 0.
Example: when this is set to 30%, at most 30% of the total number of nodes
that should be running the daemon pod (i.e. status.desiredNumberScheduled)
can have their a new pod created before the old pod is marked as deleted.
The update starts by launching new pods on 30% of nodes. Once an updated
pod is available (Ready for at least minReadySeconds) the old DaemonSet pod
on that node is marked deleted. If the old pod becomes unavailable for any
reason (Ready transitions to false, is evicted, or is drained) an updated
pod is immediately created on that node without considering surge limits.
Allowing surge implies the possibility that the resources consumed by the
daemonset on any given node can double if the readiness check fails, and
so resource intensive daemonsets should take into account that they may
cause evictions during disruption.
This is beta field and enabled/disabled by DaemonSetUpdateSurge feature gate.
x-kubernetes-int-or-string: true
maxUnavailable:
anyOf:
- type: integer
- type: string
description: 'The maximum number of DaemonSet pods that can
be unavailable during the update. Value can be an absolute
number (ex: 5) or a percentage of total number of DaemonSet
pods at the start of the update (ex: 10%). Absolute number
is calculated from percentage by rounding up. This cannot
be 0 if MaxSurge is 0 Default value is 1. Example: when
this is set to 30%, at most 30% of the total number of nodes
description: |-
The maximum number of DaemonSet pods that can be unavailable during the
update. Value can be an absolute number (ex: 5) or a percentage of total
number of DaemonSet pods at the start of the update (ex: 10%). Absolute
number is calculated from percentage by rounding up.
This cannot be 0 if MaxSurge is 0
Default value is 1.
Example: when this is set to 30%, at most 30% of the total number of nodes
that should be running the daemon pod (i.e. status.desiredNumberScheduled)
can have their pods stopped for an update at any given time.
The update starts by stopping at most 30% of those DaemonSet
pods and then brings up new DaemonSet pods in their place.
Once the new pods are available, it then proceeds onto other
DaemonSet pods, thus ensuring that at least 70% of original
number of DaemonSet pods are available at all times during
the update.'
can have their pods stopped for an update at any given time. The update
starts by stopping at most 30% of those DaemonSet pods and then brings
up new DaemonSet pods in their place. Once the new pods are available,
it then proceeds onto other DaemonSet pods, thus ensuring that at least
70% of original number of DaemonSet pods are available at all times during
the update.
x-kubernetes-int-or-string: true
partition:
description: The number of DaemonSet pods remained to be old
version. Default value is 0. Maximum value is status.DesiredNumberScheduled,
which means no pod will be updated.
description: |-
The number of DaemonSet pods remained to be old version.
Default value is 0.
Maximum value is status.DesiredNumberScheduled, which means no pod will be updated.
format: int32
type: integer
paused:
description: Indicates that the daemon set is paused and will
not be processed by the daemon set controller.
description: |-
Indicates that the daemon set is paused and will not be processed by the
daemon set controller.
type: boolean
rollingUpdateType:
description: Type is to specify which kind of rollingUpdate.
type: string
selector:
description: A label query over nodes that are managed by
the daemon set RollingUpdate. Must match in order to be
controlled. It must match the node's labels.
description: |-
A label query over nodes that are managed by the daemon set RollingUpdate.
Must match in order to be controlled.
It must match the node's labels.
properties:
matchExpressions:
description: matchExpressions is a list of label selector
requirements. The requirements are ANDed.
items:
description: A label selector requirement is a selector
that contains values, a key, and an operator that
description: |-
A label selector requirement is a selector that contains values, a key, and an operator that
relates the key and values.
properties:
key:
@ -304,35 +316,36 @@ spec:
applies to.
type: string
operator:
description: operator represents a key's relationship
to a set of values. Valid operators are In, NotIn,
Exists and DoesNotExist.
description: |-
operator represents a key's relationship to a set of values.
Valid operators are In, NotIn, Exists and DoesNotExist.
type: string
values:
description: values is an array of string values.
If the operator is In or NotIn, the values array
must be non-empty. If the operator is Exists or
DoesNotExist, the values array must be empty.
This array is replaced during a strategic merge
patch.
description: |-
values is an array of string values. If the operator is In or NotIn,
the values array must be non-empty. If the operator is Exists or DoesNotExist,
the values array must be empty. This array is replaced during a strategic
merge patch.
items:
type: string
type: array
x-kubernetes-list-type: atomic
required:
- key
- operator
type: object
type: array
x-kubernetes-list-type: atomic
matchLabels:
additionalProperties:
type: string
description: matchLabels is a map of {key,value} pairs.
A single {key,value} in the matchLabels map is equivalent
to an element of matchExpressions, whose key field is
"key", the operator is "In", and the values array contains
only "value". The requirements are ANDed.
description: |-
matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
map is equivalent to an element of matchExpressions, whose key field is "key", the
operator is "In", and the values array contains only "value". The requirements are ANDed.
type: object
type: object
x-kubernetes-map-type: atomic
type: object
type:
description: Type of daemon set update. Can be "RollingUpdate"
@ -347,9 +360,10 @@ spec:
description: DaemonSetStatus defines the observed state of DaemonSet
properties:
collisionCount:
description: Count of hash collisions for the DaemonSet. The DaemonSet
controller uses this field as a collision avoidance mechanism when
it needs to create the name for the newest ControllerRevision.
description: |-
Count of hash collisions for the DaemonSet. The DaemonSet controller
uses this field as a collision avoidance mechanism when it needs to
create the name for the newest ControllerRevision.
format: int32
type: integer
conditions:
@ -383,8 +397,10 @@ spec:
type: object
type: array
currentNumberScheduled:
description: 'The number of nodes that are running at least 1 daemon
pod and are supposed to run the daemon pod. More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/'
description: |-
The number of nodes that are running at least 1
daemon pod and are supposed to run the daemon pod.
More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/
format: int32
type: integer
daemonSetHash:
@ -392,31 +408,37 @@ spec:
represents the latest version of the DaemonSet.
type: string
desiredNumberScheduled:
description: 'The total number of nodes that should be running the
daemon pod (including nodes correctly running the daemon pod). More
info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/'
description: |-
The total number of nodes that should be running the daemon
pod (including nodes correctly running the daemon pod).
More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/
format: int32
type: integer
numberAvailable:
description: The number of nodes that should be running the daemon
pod and have one or more of the daemon pod running and available
(ready for at least spec.minReadySeconds)
description: |-
The number of nodes that should be running the
daemon pod and have one or more of the daemon pod running and
available (ready for at least spec.minReadySeconds)
format: int32
type: integer
numberMisscheduled:
description: 'The number of nodes that are running the daemon pod,
but are not supposed to run the daemon pod. More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/'
description: |-
The number of nodes that are running the daemon pod, but are
not supposed to run the daemon pod.
More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/
format: int32
type: integer
numberReady:
description: The number of nodes that should be running the daemon
pod and have one or more of the daemon pod running and ready.
description: |-
The number of nodes that should be running the daemon pod and have one
or more of the daemon pod running and ready.
format: int32
type: integer
numberUnavailable:
description: The number of nodes that should be running the daemon
pod and have none of the daemon pod running and available (ready
for at least spec.minReadySeconds)
description: |-
The number of nodes that should be running the
daemon pod and have none of the daemon pod running and available
(ready for at least spec.minReadySeconds)
format: int32
type: integer
observedGeneration:
@ -442,9 +464,3 @@ spec:
storage: true
subresources:
status: {}
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []

View File

@ -1,11 +1,9 @@
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.7.0
creationTimestamp: null
controller-gen.kubebuilder.io/version: v0.16.5
name: ephemeraljobs.apps.kruise.io
spec:
group: apps.kruise.io
@ -56,14 +54,19 @@ spec:
description: EphemeralJob is the Schema for the ephemeraljobs API
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
description: |-
APIVersion defines the versioned schema of this representation of an object.
Servers should convert recognized schemas to the latest internal value, and
may reject unrecognized values.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
type: string
kind:
description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
description: |-
Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to.
Cannot be updated.
In CamelCase.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
type: string
metadata:
type: object
@ -71,10 +74,10 @@ spec:
description: EphemeralJobSpec defines the desired state of EphemeralJob
properties:
activeDeadlineSeconds:
description: ActiveDeadlineSeconds specifies the duration in seconds
relative to the startTime that the job may be active before the
system tries to terminate it; value must be positive integer. Only
works for Always type.
description: |-
ActiveDeadlineSeconds specifies the duration in seconds relative to the startTime that the job may be active
before the system tries to terminate it; value must be positive integer.
Only works for Always type.
format: int64
type: integer
parallelism:
@ -86,58 +89,61 @@ spec:
description: Paused will pause the ephemeral job.
type: boolean
replicas:
description: Replicas indicates a part of the quantity from matched
pods by selector. Usually it is used for gray scale working. if
Replicas exceeded the matched number by selector or not be set,
replicas will not work.
description: |-
Replicas indicates a part of the quantity from matched pods by selector.
Usually it is used for gray scale working.
if Replicas exceeded the matched number by selector or not be set, replicas will not work.
format: int32
type: integer
selector:
description: 'INSERT ADDITIONAL SPEC FIELDS - desired state of cluster
description: |-
INSERT ADDITIONAL SPEC FIELDS - desired state of cluster
Important: Run "make" to regenerate code after modifying this file
Selector is a label query over pods that should match the pod labels.'
Selector is a label query over pods that should match the pod labels.
properties:
matchExpressions:
description: matchExpressions is a list of label selector requirements.
The requirements are ANDed.
items:
description: A label selector requirement is a selector that
contains values, a key, and an operator that relates the key
and values.
description: |-
A label selector requirement is a selector that contains values, a key, and an operator that
relates the key and values.
properties:
key:
description: key is the label key that the selector applies
to.
type: string
operator:
description: operator represents a key's relationship to
a set of values. Valid operators are In, NotIn, Exists
and DoesNotExist.
description: |-
operator represents a key's relationship to a set of values.
Valid operators are In, NotIn, Exists and DoesNotExist.
type: string
values:
description: values is an array of string values. If the
operator is In or NotIn, the values array must be non-empty.
If the operator is Exists or DoesNotExist, the values
array must be empty. This array is replaced during a strategic
description: |-
values is an array of string values. If the operator is In or NotIn,
the values array must be non-empty. If the operator is Exists or DoesNotExist,
the values array must be empty. This array is replaced during a strategic
merge patch.
items:
type: string
type: array
x-kubernetes-list-type: atomic
required:
- key
- operator
type: object
type: array
x-kubernetes-list-type: atomic
matchLabels:
additionalProperties:
type: string
description: matchLabels is a map of {key,value} pairs. A single
{key,value} in the matchLabels map is equivalent to an element
of matchExpressions, whose key field is "key", the operator
is "In", and the values array contains only "value". The requirements
are ANDed.
description: |-
matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
map is equivalent to an element of matchExpressions, whose key field is "key", the
operator is "In", and the values array contains only "value". The requirements are ANDed.
type: object
type: object
x-kubernetes-map-type: atomic
template:
description: Template describes the ephemeral container that will
be created.
@ -150,12 +156,14 @@ spec:
- ephemeralContainers
type: object
ttlSecondsAfterFinished:
description: ttlSecondsAfterFinished limits the lifetime of a Job
that has finished execution (either Complete or Failed). If this
field is set, ttlSecondsAfterFinished after the eJob finishes, it
is eligible to be automatically deleted. When the Job is being deleted,
its lifecycle guarantees (e.g. finalizers) will be honored. If this
field is unset, default value is 1800 If this field is set to zero,
description: |-
ttlSecondsAfterFinished limits the lifetime of a Job that has finished
execution (either Complete or Failed). If this field is set,
ttlSecondsAfterFinished after the eJob finishes, it is eligible to be
automatically deleted. When the Job is being deleted, its lifecycle
guarantees (e.g. finalizers) will be honored.
If this field is unset, default value is 1800
If this field is set to zero,
the Job becomes eligible to be deleted immediately after it finishes.
format: int32
type: integer
@ -167,15 +175,16 @@ spec:
description: EphemeralJobStatus defines the observed state of EphemeralJob
properties:
completionTime:
description: Represents time when the job was completed. It is not
guaranteed to be set in happens-before order across separate operations.
description: |-
Represents time when the job was completed. It is not guaranteed to
be set in happens-before order across separate operations.
It is represented in RFC3339 form and is in UTC.
format: date-time
type: string
conditions:
description: 'INSERT ADDITIONAL STATUS FIELD - define observed state
of cluster Important: Run "make" to regenerate code after modifying
this file'
description: |-
INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
Important: Run "make" to regenerate code after modifying this file
items:
description: JobCondition describes current state of a job.
properties:
@ -222,10 +231,10 @@ spec:
format: int32
type: integer
startTime:
description: Represents time when the job was acknowledged by the
job controller. It is not guaranteed to be set in happens-before
order across separate operations. It is represented in RFC3339 form
and is in UTC.
description: |-
Represents time when the job was acknowledged by the job controller.
It is not guaranteed to be set in happens-before order across separate operations.
It is represented in RFC3339 form and is in UTC.
format: date-time
type: string
succeeded:
@ -242,9 +251,3 @@ spec:
storage: true
subresources:
status: {}
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []

View File

@ -0,0 +1,316 @@
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.16.5
name: imagelistpulljobs.apps.kruise.io
spec:
group: apps.kruise.io
names:
kind: ImageListPullJob
listKind: ImageListPullJobList
plural: imagelistpulljobs
singular: imagelistpulljob
scope: Namespaced
versions:
- additionalPrinterColumns:
- description: Number of image pull job
jsonPath: .status.desired
name: TOTAL
type: integer
- description: Number of image pull job succeeded
jsonPath: .status.succeeded
name: SUCCEEDED
type: integer
- description: Number of ImagePullJobs which are finished
jsonPath: .status.completed
name: COMPLETED
type: integer
- description: CreationTimestamp is a timestamp representing the server time when
this object was created. It is not guaranteed to be set in happens-before
order across separate operations. Clients may not set this value. It is represented
in RFC3339 form and is in UTC.
jsonPath: .metadata.creationTimestamp
name: AGE
type: date
name: v1alpha1
schema:
openAPIV3Schema:
description: ImageListPullJob is the Schema for the imagelistpulljobs API
properties:
apiVersion:
description: |-
APIVersion defines the versioned schema of this representation of an object.
Servers should convert recognized schemas to the latest internal value, and
may reject unrecognized values.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
type: string
kind:
description: |-
Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to.
Cannot be updated.
In CamelCase.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
type: string
metadata:
type: object
spec:
description: ImageListPullJobSpec defines the desired state of ImageListPullJob
properties:
completionPolicy:
description: |-
CompletionPolicy indicates the completion policy of the job.
Default is Always CompletionPolicyType.
properties:
activeDeadlineSeconds:
description: |-
ActiveDeadlineSeconds specifies the duration in seconds relative to the startTime that the job may be active
before the system tries to terminate it; value must be positive integer.
Only works for Always type.
format: int64
type: integer
ttlSecondsAfterFinished:
description: |-
ttlSecondsAfterFinished limits the lifetime of a Job that has finished
execution (either Complete or Failed). If this field is set,
ttlSecondsAfterFinished after the Job finishes, it is eligible to be
automatically deleted. When the Job is being deleted, its lifecycle
guarantees (e.g. finalizers) will be honored. If this field is unset,
the Job won't be automatically deleted. If this field is set to zero,
the Job becomes eligible to be deleted immediately after it finishes.
This field is alpha-level and is only honored by servers that enable the
TTLAfterFinished feature.
Only works for Always type
format: int32
type: integer
type:
description: |-
Type indicates the type of the CompletionPolicy.
Default is Always.
type: string
type: object
imagePullPolicy:
description: |-
Image pull policy.
One of Always, IfNotPresent. Defaults to IfNotPresent.
type: string
images:
description: Images is the image list to be pulled by the job
items:
type: string
type: array
parallelism:
anyOf:
- type: integer
- type: string
description: |-
Parallelism is the requested parallelism, it can be set to any non-negative value. If it is unspecified,
it defaults to 1. If it is specified as 0, then the Job is effectively paused until it is increased.
x-kubernetes-int-or-string: true
podSelector:
description: |-
PodSelector is a query over pods that should pull image on nodes of these pods.
Mutually exclusive with Selector.
properties:
matchExpressions:
description: matchExpressions is a list of label selector requirements.
The requirements are ANDed.
items:
description: |-
A label selector requirement is a selector that contains values, a key, and an operator that
relates the key and values.
properties:
key:
description: key is the label key that the selector applies
to.
type: string
operator:
description: |-
operator represents a key's relationship to a set of values.
Valid operators are In, NotIn, Exists and DoesNotExist.
type: string
values:
description: |-
values is an array of string values. If the operator is In or NotIn,
the values array must be non-empty. If the operator is Exists or DoesNotExist,
the values array must be empty. This array is replaced during a strategic
merge patch.
items:
type: string
type: array
x-kubernetes-list-type: atomic
required:
- key
- operator
type: object
type: array
x-kubernetes-list-type: atomic
matchLabels:
additionalProperties:
type: string
description: |-
matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
map is equivalent to an element of matchExpressions, whose key field is "key", the
operator is "In", and the values array contains only "value". The requirements are ANDed.
type: object
type: object
x-kubernetes-map-type: atomic
pullPolicy:
description: |-
PullPolicy is an optional field to set parameters of the pulling task. If not specified,
the system will use the default values.
properties:
backoffLimit:
description: |-
Specifies the number of retries before marking the pulling task failed.
Defaults to 3
format: int32
type: integer
timeoutSeconds:
description: |-
Specifies the timeout of the pulling task.
Defaults to 600
format: int32
type: integer
type: object
pullSecrets:
description: |-
ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling the image.
If specified, these secrets will be passed to individual puller implementations for them to use. For example,
in the case of docker, only DockerConfig type secrets are honored.
items:
type: string
type: array
sandboxConfig:
description: SandboxConfig support attach metadata in PullImage CRI
interface during ImagePulljobs
properties:
annotations:
additionalProperties:
type: string
type: object
labels:
additionalProperties:
type: string
type: object
type: object
selector:
description: |-
Selector is a query over nodes that should match the job.
nil to match all nodes.
properties:
matchExpressions:
description: matchExpressions is a list of label selector requirements.
The requirements are ANDed.
items:
description: |-
A label selector requirement is a selector that contains values, a key, and an operator that
relates the key and values.
properties:
key:
description: key is the label key that the selector applies
to.
type: string
operator:
description: |-
operator represents a key's relationship to a set of values.
Valid operators are In, NotIn, Exists and DoesNotExist.
type: string
values:
description: |-
values is an array of string values. If the operator is In or NotIn,
the values array must be non-empty. If the operator is Exists or DoesNotExist,
the values array must be empty. This array is replaced during a strategic
merge patch.
items:
type: string
type: array
x-kubernetes-list-type: atomic
required:
- key
- operator
type: object
type: array
x-kubernetes-list-type: atomic
matchLabels:
additionalProperties:
type: string
description: |-
matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
map is equivalent to an element of matchExpressions, whose key field is "key", the
operator is "In", and the values array contains only "value". The requirements are ANDed.
type: object
names:
description: Names specify a set of nodes to execute the job.
items:
type: string
type: array
type: object
x-kubernetes-map-type: atomic
required:
- completionPolicy
- images
type: object
status:
description: ImageListPullJobStatus defines the observed state of ImageListPullJob
properties:
active:
description: The number of running ImagePullJobs which are acknowledged
by the imagepulljob controller.
format: int32
type: integer
completed:
description: The number of ImagePullJobs which are finished
format: int32
type: integer
completionTime:
description: |-
Represents time when the all the image pull job was completed. It is not guaranteed to
be set in happens-before order across separate operations.
It is represented in RFC3339 form and is in UTC.
format: date-time
type: string
desired:
description: The desired number of ImagePullJobs, this is typically
equal to the number of len(spec.Images).
format: int32
type: integer
failedImageStatuses:
description: The status of ImagePullJob which has the failed nodes(status.Failed>0)
.
items:
description: FailedImageStatus the state of ImagePullJob which has
the failed nodes(status.Failed>0)
properties:
imagePullJob:
description: The name of ImagePullJob which has the failed nodes(status.Failed>0)
type: string
message:
description: The text prompt for job running status.
type: string
name:
description: Name of the image
type: string
type: object
type: array
startTime:
description: |-
Represents time when the job was acknowledged by the job controller.
It is not guaranteed to be set in happens-before order across separate operations.
It is represented in RFC3339 form and is in UTC.
format: date-time
type: string
succeeded:
description: The number of image pull job which are finished and status.Succeeded==status.Desired.
format: int32
type: integer
required:
- desired
type: object
type: object
served: true
storage: true
subresources:
status: {}

View File

@ -1,11 +1,9 @@
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.7.0
creationTimestamp: null
controller-gen.kubebuilder.io/version: v0.16.5
name: imagepulljobs.apps.kruise.io
spec:
group: apps.kruise.io
@ -50,14 +48,19 @@ spec:
description: ImagePullJob is the Schema for the imagepulljobs API
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
description: |-
APIVersion defines the versioned schema of this representation of an object.
Servers should convert recognized schemas to the latest internal value, and
may reject unrecognized values.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
type: string
kind:
description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
description: |-
Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to.
Cannot be updated.
In CamelCase.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
type: string
metadata:
type: object
@ -65,113 +68,124 @@ spec:
description: ImagePullJobSpec defines the desired state of ImagePullJob
properties:
completionPolicy:
description: CompletionPolicy indicates the completion policy of the
job. Default is Always CompletionPolicyType.
description: |-
CompletionPolicy indicates the completion policy of the job.
Default is Always CompletionPolicyType.
properties:
activeDeadlineSeconds:
description: ActiveDeadlineSeconds specifies the duration in seconds
relative to the startTime that the job may be active before
the system tries to terminate it; value must be positive integer.
description: |-
ActiveDeadlineSeconds specifies the duration in seconds relative to the startTime that the job may be active
before the system tries to terminate it; value must be positive integer.
Only works for Always type.
format: int64
type: integer
ttlSecondsAfterFinished:
description: ttlSecondsAfterFinished limits the lifetime of a
Job that has finished execution (either Complete or Failed).
If this field is set, ttlSecondsAfterFinished after the Job
finishes, it is eligible to be automatically deleted. When the
Job is being deleted, its lifecycle guarantees (e.g. finalizers)
will be honored. If this field is unset, the Job won't be automatically
deleted. If this field is set to zero, the Job becomes eligible
to be deleted immediately after it finishes. This field is alpha-level
and is only honored by servers that enable the TTLAfterFinished
feature. Only works for Always type
description: |-
ttlSecondsAfterFinished limits the lifetime of a Job that has finished
execution (either Complete or Failed). If this field is set,
ttlSecondsAfterFinished after the Job finishes, it is eligible to be
automatically deleted. When the Job is being deleted, its lifecycle
guarantees (e.g. finalizers) will be honored. If this field is unset,
the Job won't be automatically deleted. If this field is set to zero,
the Job becomes eligible to be deleted immediately after it finishes.
This field is alpha-level and is only honored by servers that enable the
TTLAfterFinished feature.
Only works for Always type
format: int32
type: integer
type:
description: Type indicates the type of the CompletionPolicy.
description: |-
Type indicates the type of the CompletionPolicy.
Default is Always.
type: string
type: object
image:
description: Image is the image to be pulled by the job
type: string
imagePullPolicy:
description: |-
Image pull policy.
One of Always, IfNotPresent. Defaults to IfNotPresent.
type: string
parallelism:
anyOf:
- type: integer
- type: string
description: Parallelism is the requested parallelism, it can be set
to any non-negative value. If it is unspecified, it defaults to
1. If it is specified as 0, then the Job is effectively paused until
it is increased.
description: |-
Parallelism is the requested parallelism, it can be set to any non-negative value. If it is unspecified,
it defaults to 1. If it is specified as 0, then the Job is effectively paused until it is increased.
x-kubernetes-int-or-string: true
podSelector:
description: PodSelector is a query over pods that should pull image
on nodes of these pods. Mutually exclusive with Selector.
description: |-
PodSelector is a query over pods that should pull image on nodes of these pods.
Mutually exclusive with Selector.
properties:
matchExpressions:
description: matchExpressions is a list of label selector requirements.
The requirements are ANDed.
items:
description: A label selector requirement is a selector that
contains values, a key, and an operator that relates the key
and values.
description: |-
A label selector requirement is a selector that contains values, a key, and an operator that
relates the key and values.
properties:
key:
description: key is the label key that the selector applies
to.
type: string
operator:
description: operator represents a key's relationship to
a set of values. Valid operators are In, NotIn, Exists
and DoesNotExist.
description: |-
operator represents a key's relationship to a set of values.
Valid operators are In, NotIn, Exists and DoesNotExist.
type: string
values:
description: values is an array of string values. If the
operator is In or NotIn, the values array must be non-empty.
If the operator is Exists or DoesNotExist, the values
array must be empty. This array is replaced during a strategic
description: |-
values is an array of string values. If the operator is In or NotIn,
the values array must be non-empty. If the operator is Exists or DoesNotExist,
the values array must be empty. This array is replaced during a strategic
merge patch.
items:
type: string
type: array
x-kubernetes-list-type: atomic
required:
- key
- operator
type: object
type: array
x-kubernetes-list-type: atomic
matchLabels:
additionalProperties:
type: string
description: matchLabels is a map of {key,value} pairs. A single
{key,value} in the matchLabels map is equivalent to an element
of matchExpressions, whose key field is "key", the operator
is "In", and the values array contains only "value". The requirements
are ANDed.
description: |-
matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
map is equivalent to an element of matchExpressions, whose key field is "key", the
operator is "In", and the values array contains only "value". The requirements are ANDed.
type: object
type: object
x-kubernetes-map-type: atomic
pullPolicy:
description: PullPolicy is an optional field to set parameters of
the pulling task. If not specified, the system will use the default
values.
description: |-
PullPolicy is an optional field to set parameters of the pulling task. If not specified,
the system will use the default values.
properties:
backoffLimit:
description: Specifies the number of retries before marking the
pulling task failed. Defaults to 3
description: |-
Specifies the number of retries before marking the pulling task failed.
Defaults to 3
format: int32
type: integer
timeoutSeconds:
description: Specifies the timeout of the pulling task. Defaults
to 600
description: |-
Specifies the timeout of the pulling task.
Defaults to 600
format: int32
type: integer
type: object
pullSecrets:
description: ImagePullSecrets is an optional list of references to
secrets in the same namespace to use for pulling the image. If specified,
these secrets will be passed to individual puller implementations
for them to use. For example, in the case of docker, only DockerConfig
type secrets are honored.
description: |-
ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling the image.
If specified, these secrets will be passed to individual puller implementations for them to use. For example,
in the case of docker, only DockerConfig type secrets are honored.
items:
type: string
type: array
@ -189,48 +203,50 @@ spec:
type: object
type: object
selector:
description: Selector is a query over nodes that should match the
job. nil to match all nodes.
description: |-
Selector is a query over nodes that should match the job.
nil to match all nodes.
properties:
matchExpressions:
description: matchExpressions is a list of label selector requirements.
The requirements are ANDed.
items:
description: A label selector requirement is a selector that
contains values, a key, and an operator that relates the key
and values.
description: |-
A label selector requirement is a selector that contains values, a key, and an operator that
relates the key and values.
properties:
key:
description: key is the label key that the selector applies
to.
type: string
operator:
description: operator represents a key's relationship to
a set of values. Valid operators are In, NotIn, Exists
and DoesNotExist.
description: |-
operator represents a key's relationship to a set of values.
Valid operators are In, NotIn, Exists and DoesNotExist.
type: string
values:
description: values is an array of string values. If the
operator is In or NotIn, the values array must be non-empty.
If the operator is Exists or DoesNotExist, the values
array must be empty. This array is replaced during a strategic
description: |-
values is an array of string values. If the operator is In or NotIn,
the values array must be non-empty. If the operator is Exists or DoesNotExist,
the values array must be empty. This array is replaced during a strategic
merge patch.
items:
type: string
type: array
x-kubernetes-list-type: atomic
required:
- key
- operator
type: object
type: array
x-kubernetes-list-type: atomic
matchLabels:
additionalProperties:
type: string
description: matchLabels is a map of {key,value} pairs. A single
{key,value} in the matchLabels map is equivalent to an element
of matchExpressions, whose key field is "key", the operator
is "In", and the values array contains only "value". The requirements
are ANDed.
description: |-
matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
map is equivalent to an element of matchExpressions, whose key field is "key", the
operator is "In", and the values array contains only "value". The requirements are ANDed.
type: object
names:
description: Names specify a set of nodes to execute the job.
@ -238,6 +254,7 @@ spec:
type: string
type: array
type: object
x-kubernetes-map-type: atomic
required:
- completionPolicy
- image
@ -250,8 +267,9 @@ spec:
format: int32
type: integer
completionTime:
description: Represents time when the job was completed. It is not
guaranteed to be set in happens-before order across separate operations.
description: |-
Represents time when the job was completed. It is not guaranteed to
be set in happens-before order across separate operations.
It is represented in RFC3339 form and is in UTC.
format: date-time
type: string
@ -273,10 +291,10 @@ spec:
description: The text prompt for job running status.
type: string
startTime:
description: Represents time when the job was acknowledged by the
job controller. It is not guaranteed to be set in happens-before
order across separate operations. It is represented in RFC3339 form
and is in UTC.
description: |-
Represents time when the job was acknowledged by the job controller.
It is not guaranteed to be set in happens-before order across separate operations.
It is represented in RFC3339 form and is in UTC.
format: date-time
type: string
succeeded:
@ -291,9 +309,3 @@ spec:
storage: true
subresources:
status: {}
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []

View File

@ -1,11 +1,9 @@
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.7.0
creationTimestamp: null
controller-gen.kubebuilder.io/version: v0.16.5
name: nodeimages.apps.kruise.io
spec:
group: apps.kruise.io
@ -46,14 +44,19 @@ spec:
description: NodeImage is the Schema for the nodeimages API
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
description: |-
APIVersion defines the versioned schema of this representation of an object.
Servers should convert recognized schemas to the latest internal value, and
may reject unrecognized values.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
type: string
kind:
description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
description: |-
Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to.
Cannot be updated.
In CamelCase.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
type: string
metadata:
type: object
@ -65,14 +68,14 @@ spec:
description: ImageSpec defines the pulling spec of an image
properties:
pullSecrets:
description: PullSecrets is an optional list of references to
secrets in the same namespace to use for pulling the image.
If specified, these secrets will be passed to individual puller
implementations for them to use. For example, in the case
of docker, only DockerConfig type secrets are honored.
description: |-
PullSecrets is an optional list of references to secrets in the same namespace to use for pulling the image.
If specified, these secrets will be passed to individual puller implementations for them to use. For example,
in the case of docker, only DockerConfig type secrets are honored.
items:
description: ReferenceObject comprises a resource name, with
a mandatory namespace, rendered as "<namespace>/<name>".
description: |-
ReferenceObject comprises a resource name, with a mandatory namespace,
rendered as "<namespace>/<name>".
properties:
name:
type: string
@ -103,112 +106,90 @@ spec:
description: Specifies the create time of this tag
format: date-time
type: string
imagePullPolicy:
description: |-
Image pull policy.
One of Always, IfNotPresent. Defaults to IfNotPresent.
type: string
ownerReferences:
description: 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.
description: |-
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.
items:
description: 'ObjectReference contains enough information
description: ObjectReference contains enough information
to let you inspect or modify the referred object.
--- New uses of this type are discouraged because
of difficulty describing its usage when embedded in
APIs. 1. Ignored fields. It includes many fields
which are not generally honored. For instance, ResourceVersion
and FieldPath are both very rarely valid in actual
usage. 2. Invalid usage help. It is impossible to
add specific help for individual usage. In most embedded
usages, there are particular restrictions like,
"must refer only to types A and B" or "UID not honored"
or "name must be restricted". Those cannot be
well described when embedded. 3. Inconsistent validation. Because
the usages are different, the validation rules are
different by usage, which makes it hard for users
to predict what will happen. 4. The fields are both
imprecise and overly precise. Kind is not a precise
mapping to a URL. This can produce ambiguity during
interpretation and require a REST mapping. In most
cases, the dependency is on the group,resource tuple and
the version of the actual struct is irrelevant. 5.
We cannot easily change it. Because this type is
embedded in many locations, updates to this type will
affect numerous schemas. Don''t make new APIs embed
an underspecified API type they do not control. Instead
of using this type, create a locally provided and
used type that is well-focused on your reference.
For example, ServiceReferences for admission registration:
https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533
.'
properties:
apiVersion:
description: API version of the referent.
type: string
fieldPath:
description: 'If referring to a piece of an object
instead of an entire object, this string should
contain a valid JSON/Go field access statement,
such as desiredState.manifest.containers[2]. For
example, if the object reference is to a container
within a pod, this would take on a value like:
"spec.containers{name}" (where "name" refers to
the name of the container that triggered the event)
or if no container name is specified "spec.containers[2]"
(container with index 2 in this pod). This syntax
is chosen only to have some well-defined way of
referencing a part of an object. TODO: this design
is not final and this field is subject to change
in the future.'
description: |-
If referring to a piece of an object instead of an entire object, this string
should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2].
For example, if the object reference is to a container within a pod, this would take on a value like:
"spec.containers{name}" (where "name" refers to the name of the container that triggered
the event) or if no container name is specified "spec.containers[2]" (container with
index 2 in this pod). This syntax is chosen only to have some well-defined way of
referencing a part of an object.
type: string
kind:
description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
description: |-
Kind of the referent.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
type: string
name:
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
description: |-
Name of the referent.
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
type: string
namespace:
description: 'Namespace of the referent. More info:
https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
description: |-
Namespace of the referent.
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/
type: string
resourceVersion:
description: 'Specific resourceVersion to which
this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency'
description: |-
Specific resourceVersion to which this reference is made, if any.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency
type: string
uid:
description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids'
description: |-
UID of the referent.
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids
type: string
type: object
x-kubernetes-map-type: atomic
type: array
pullPolicy:
description: PullPolicy is an optional field to set parameters
of the pulling task. If not specified, the system will
use the default values.
description: |-
PullPolicy is an optional field to set parameters of the pulling task. If not specified,
the system will use the default values.
properties:
activeDeadlineSeconds:
description: ActiveDeadlineSeconds specifies the duration
in seconds relative to the startTime that the task
may be active before the system tries to terminate
it; value must be positive integer. if not specified,
the system will never terminate it.
description: |-
ActiveDeadlineSeconds specifies the duration in seconds relative to the startTime that the task may be active
before the system tries to terminate it; value must be positive integer.
if not specified, the system will never terminate it.
format: int64
type: integer
backoffLimit:
description: Specifies the number of retries before
marking the pulling task failed. Defaults to 3
description: |-
Specifies the number of retries before marking the pulling task failed.
Defaults to 3
format: int32
type: integer
timeoutSeconds:
description: Specifies the timeout of the pulling
task. Defaults to 600
description: |-
Specifies the timeout of the pulling task.
Defaults to 600
format: int32
type: integer
ttlSecondsAfterFinished:
description: TTLSecondsAfterFinished limits the lifetime
of a pulling task that has finished execution (either
Complete or Failed). If this field is set, ttlSecondsAfterFinished
after the task finishes, it is eligible to be automatically
deleted. If this field is unset, the task won't
be automatically deleted. If this field is set to
zero, the task becomes eligible to be deleted immediately
after it finishes.
description: |-
TTLSecondsAfterFinished limits the lifetime of a pulling task that has finished execution (either Complete or Failed).
If this field is set, ttlSecondsAfterFinished after the task finishes, it is eligible to be automatically deleted.
If this field is unset, the task won't be automatically deleted.
If this field is set to zero, the task becomes eligible to be deleted immediately after it finishes.
format: int32
type: integer
type: object
@ -216,14 +197,15 @@ spec:
description: Specifies the image tag
type: string
version:
description: "An opaque value that represents the internal
version of this tag that can be used by clients to determine
when objects have changed. May be used for optimistic
concurrency, change detection, and the watch operation
on a resource or set of resources. Clients must treat
these values as opaque and passed unmodified back to
the server. \n Populated by the system. Read-only. Value
must be treated as opaque by clients and ."
description: |-
An opaque value that represents the internal version of this tag that can
be used by clients to determine when objects have changed. May be used for optimistic
concurrency, change detection, and the watch operation on a resource or set of resources.
Clients must treat these values as opaque and passed unmodified back to the server.
Populated by the system.
Read-only.
Value must be treated as opaque by clients and .
format: int64
type: integer
required:
@ -233,8 +215,9 @@ spec:
required:
- tags
type: object
description: Specifies images to be pulled on this node It can not
be more than 256 for each NodeImage
description: |-
Specifies images to be pulled on this node
It can not be more than 256 for each NodeImage
type: object
type: object
status:
@ -250,10 +233,9 @@ spec:
format: int32
type: integer
firstSyncStatus:
description: The first of all job has finished on this node. When
a node is added to the cluster, we want to know the time when the
node's image pulling is completed, and use it to trigger the operation
of the upper system.
description: |-
The first of all job has finished on this node. When a node is added to the cluster, we want to know
the time when the node's image pulling is completed, and use it to trigger the operation of the upper system.
properties:
message:
type: string
@ -275,10 +257,10 @@ spec:
an image tag
properties:
completionTime:
description: Represents time when the pulling task was
completed. It is not guaranteed to be set in happens-before
order across separate operations. It is represented
in RFC3339 form and is in UTC.
description: |-
Represents time when the pulling task was completed. It is not guaranteed to
be set in happens-before order across separate operations.
It is represented in RFC3339 form and is in UTC.
format: date-time
type: string
imageID:
@ -292,16 +274,15 @@ spec:
description: Represents the image pulling task phase.
type: string
progress:
description: Represents the pulling progress of this tag,
which is between 0-100. There is no guarantee of monotonic
consistency, and it may be a rollback due to retry during
pulling.
description: |-
Represents the pulling progress of this tag, which is between 0-100. There is no guarantee
of monotonic consistency, and it may be a rollback due to retry during pulling.
format: int32
type: integer
startTime:
description: Represents time when the pulling task was
acknowledged by the image puller. It is not guaranteed
to be set in happens-before order across separate operations.
description: |-
Represents time when the pulling task was acknowledged by the image puller.
It is not guaranteed to be set in happens-before order across separate operations.
It is represented in RFC3339 form and is in UTC.
format: date-time
type: string
@ -331,6 +312,10 @@ spec:
description: The number of pulling tasks which reached phase Succeeded.
format: int32
type: integer
waiting:
description: The number of pulling tasks which are waiting.
format: int32
type: integer
required:
- desired
type: object
@ -339,9 +324,3 @@ spec:
storage: true
subresources:
status: {}
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []

View File

@ -1,11 +1,9 @@
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.7.0
creationTimestamp: null
controller-gen.kubebuilder.io/version: v0.16.5
name: nodepodprobes.apps.kruise.io
spec:
group: apps.kruise.io
@ -22,14 +20,19 @@ spec:
description: NodePodProbe is the Schema for the NodePodProbe API
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
description: |-
APIVersion defines the versioned schema of this representation of an object.
Servers should convert recognized schemas to the latest internal value, and
may reject unrecognized values.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
type: string
kind:
description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
description: |-
Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to.
Cannot be updated.
In CamelCase.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
type: string
metadata:
type: object
@ -39,6 +42,9 @@ spec:
podProbes:
items:
properties:
IP:
description: pod ip
type: string
name:
description: pod name
type: string
@ -60,37 +66,54 @@ spec:
description: container probe spec
properties:
exec:
description: One and only one of the following should
be specified. Exec specifies the action to take.
description: Exec specifies a command to execute in
the container.
properties:
command:
description: Command is the command line to execute
inside the container, the working directory
for the command is root ('/') in the container's
filesystem. The command is simply exec'd, it
is not run inside a shell, so traditional shell
instructions ('|', etc) won't work. To use a
shell, you need to explicitly call out to that
shell. Exit status of 0 is treated as live/healthy
and non-zero is unhealthy.
description: |-
Command is the command line to execute inside the container, the working directory for the
command is root ('/') in the container's filesystem. The command is simply exec'd, it is
not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use
a shell, you need to explicitly call out to that shell.
Exit status of 0 is treated as live/healthy and non-zero is unhealthy.
items:
type: string
type: array
x-kubernetes-list-type: atomic
type: object
failureThreshold:
description: Minimum consecutive failures for the
probe to be considered failed after having succeeded.
description: |-
Minimum consecutive failures for the probe to be considered failed after having succeeded.
Defaults to 3. Minimum value is 1.
format: int32
type: integer
grpc:
description: GRPC specifies a GRPC HealthCheckRequest.
properties:
port:
description: Port number of the gRPC service.
Number must be in the range 1 to 65535.
format: int32
type: integer
service:
default: ""
description: |-
Service is the name of the service to place in the gRPC HealthCheckRequest
(see https://github.com/grpc/grpc/blob/master/doc/health-checking.md).
If this is not specified, the default behavior is defined by gRPC.
type: string
required:
- port
type: object
httpGet:
description: HTTPGet specifies the http request to
perform.
description: HTTPGet specifies an HTTP GET request
to perform.
properties:
host:
description: Host name to connect to, defaults
to the pod IP. You probably want to set "Host"
in httpHeaders instead.
description: |-
Host name to connect to, defaults to the pod IP. You probably want to set
"Host" in httpHeaders instead.
type: string
httpHeaders:
description: Custom headers to set in the request.
@ -100,7 +123,9 @@ spec:
to be used in HTTP probes
properties:
name:
description: The header field name
description: |-
The header field name.
This will be canonicalized upon output, so case-variant names will be understood as the same header.
type: string
value:
description: The header field value
@ -110,6 +135,7 @@ spec:
- value
type: object
type: array
x-kubernetes-list-type: atomic
path:
description: Path to access on the HTTP server.
type: string
@ -117,39 +143,40 @@ spec:
anyOf:
- type: integer
- type: string
description: Name or number of the port to access
on the container. Number must be in the range
1 to 65535. Name must be an IANA_SVC_NAME.
description: |-
Name or number of the port to access on the container.
Number must be in the range 1 to 65535.
Name must be an IANA_SVC_NAME.
x-kubernetes-int-or-string: true
scheme:
description: Scheme to use for connecting to the
host. Defaults to HTTP.
description: |-
Scheme to use for connecting to the host.
Defaults to HTTP.
type: string
required:
- port
type: object
initialDelaySeconds:
description: 'Number of seconds after the container
has started before liveness probes are initiated.
More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
description: |-
Number of seconds after the container has started before liveness probes are initiated.
More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
format: int32
type: integer
periodSeconds:
description: How often (in seconds) to perform the
probe. Default to 10 seconds. Minimum value is 1.
description: |-
How often (in seconds) to perform the probe.
Default to 10 seconds. Minimum value is 1.
format: int32
type: integer
successThreshold:
description: Minimum consecutive successes for the
probe to be considered successful after having failed.
Defaults to 1. Must be 1 for liveness and startup.
Minimum value is 1.
description: |-
Minimum consecutive successes for the probe to be considered successful after having failed.
Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1.
format: int32
type: integer
tcpSocket:
description: 'TCPSocket specifies an action involving
a TCP port. TCP hooks not yet supported TODO: implement
a realistic TCP lifecycle hook'
description: TCPSocket specifies a connection to a
TCP port.
properties:
host:
description: 'Optional: Host name to connect to,
@ -159,35 +186,33 @@ spec:
anyOf:
- type: integer
- type: string
description: Number or name of the port to access
on the container. Number must be in the range
1 to 65535. Name must be an IANA_SVC_NAME.
description: |-
Number or name of the port to access on the container.
Number must be in the range 1 to 65535.
Name must be an IANA_SVC_NAME.
x-kubernetes-int-or-string: true
required:
- port
type: object
terminationGracePeriodSeconds:
description: Optional duration in seconds the pod
needs to terminate gracefully upon probe failure.
The grace period is the duration in seconds after
the processes running in the pod are sent a termination
signal and the time when the processes are forcibly
halted with a kill signal. Set this value longer
than the expected cleanup time for your process.
If this value is nil, the pod's terminationGracePeriodSeconds
will be used. Otherwise, this value overrides the
value provided by the pod spec. Value must be non-negative
integer. The value zero indicates stop immediately
via the kill signal (no opportunity to shut down).
This is a beta field and requires enabling ProbeTerminationGracePeriod
feature gate. Minimum value is 1. spec.terminationGracePeriodSeconds
is used if unset.
description: |-
Optional duration in seconds the pod needs to terminate gracefully upon probe failure.
The grace period is the duration in seconds after the processes running in the pod are sent
a termination signal and the time when the processes are forcibly halted with a kill signal.
Set this value longer than the expected cleanup time for your process.
If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this
value overrides the value provided by the pod spec.
Value must be non-negative integer. The value zero indicates stop immediately via
the kill signal (no opportunity to shut down).
This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate.
Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset.
format: int64
type: integer
timeoutSeconds:
description: 'Number of seconds after which the probe
times out. Defaults to 1 second. Minimum value is
1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
description: |-
Number of seconds after which the probe times out.
Defaults to 1 second. Minimum value is 1.
More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
format: int32
type: integer
type: object
@ -201,6 +226,7 @@ spec:
description: pod uid
type: string
required:
- IP
- name
- namespace
- uid
@ -233,9 +259,9 @@ spec:
format: date-time
type: string
message:
description: If Status=True, Message records the return
result of Probe. If Status=False, Message records Probe's
error message
description: |-
If Status=True, Message records the return result of Probe.
If Status=False, Message records Probe's error message
type: string
name:
description: Name is podProbeMarker.Name#probe.Name
@ -263,9 +289,3 @@ spec:
storage: true
subresources:
status: {}
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []

View File

@ -1,11 +1,9 @@
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.7.0
creationTimestamp: null
controller-gen.kubebuilder.io/version: v0.16.5
name: persistentpodstates.apps.kruise.io
spec:
group: apps.kruise.io
@ -22,14 +20,19 @@ spec:
description: PersistentPodState is the Schema for the PersistentPodState API
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
description: |-
APIVersion defines the versioned schema of this representation of an object.
Servers should convert recognized schemas to the latest internal value, and
may reject unrecognized values.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
type: string
kind:
description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
description: |-
Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to.
Cannot be updated.
In CamelCase.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
type: string
metadata:
type: object
@ -48,13 +51,14 @@ spec:
type: object
type: array
persistentPodStateRetentionPolicy:
description: PersistentPodStateRetentionPolicy describes the policy
used for PodState. The default policy of 'WhenScaled' causes when
scale down statefulSet, deleting it.
description: |-
PersistentPodStateRetentionPolicy describes the policy used for PodState.
The default policy of 'WhenScaled' causes when scale down statefulSet, deleting it.
type: string
preferredPersistentTopology:
description: Pod rebuilt topology preferred for node labels, with
xx weight for example kubernetes.io/hostname, failure-domain.beta.kubernetes.io/zone
description: |-
Pod rebuilt topology preferred for node labels, with xx weight
for example kubernetes.io/hostname, failure-domain.beta.kubernetes.io/zone
items:
properties:
preference:
@ -77,8 +81,9 @@ spec:
type: object
type: array
requiredPersistentTopology:
description: Pod rebuilt topology required for node labels for example
kubernetes.io/hostname, failure-domain.beta.kubernetes.io/zone
description: |-
Pod rebuilt topology required for node labels
for example kubernetes.io/hostname, failure-domain.beta.kubernetes.io/zone
properties:
nodeTopologyKeys:
description: A list of node selector requirements by node's labels.
@ -89,9 +94,9 @@ spec:
- nodeTopologyKeys
type: object
targetRef:
description: TargetReference contains enough information to let you
identify an workload for PersistentPodState Selector and TargetReference
are mutually exclusive, TargetReference is priority to take effect
description: |-
TargetReference contains enough information to let you identify an workload for PersistentPodState
Selector and TargetReference are mutually exclusive, TargetReference is priority to take effect
current only support StatefulSet
properties:
apiVersion:
@ -114,9 +119,9 @@ spec:
status:
properties:
observedGeneration:
description: observedGeneration is the most recent generation observed
for this PersistentPodState. It corresponds to the PersistentPodState's
generation, which is updated on mutation by the API Server.
description: |-
observedGeneration is the most recent generation observed for this PersistentPodState. It corresponds to the
PersistentPodState's generation, which is updated on mutation by the API Server.
format: int64
type: integer
podStates:
@ -133,12 +138,14 @@ spec:
nodeTopologyLabels:
additionalProperties:
type: string
description: node topology labels key=value for example kubernetes.io/hostname=node-1
description: |-
node topology labels key=value
for example kubernetes.io/hostname=node-1
type: object
type: object
description: 'When the pod is ready, record some status information
of the pod, such as: labels, annotations, topologies, etc. map[string]PodState
-> map[Pod.Name]PodState'
description: |-
When the pod is ready, record some status information of the pod, such as: labels, annotations, topologies, etc.
map[string]PodState -> map[Pod.Name]PodState
type: object
required:
- observedGeneration
@ -148,9 +155,3 @@ spec:
storage: true
subresources:
status: {}
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []

View File

@ -1,11 +1,9 @@
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.7.0
creationTimestamp: null
controller-gen.kubebuilder.io/version: v0.16.5
name: podprobemarkers.apps.kruise.io
spec:
group: apps.kruise.io
@ -22,14 +20,19 @@ spec:
description: PodProbeMarker is the Schema for the PodProbeMarker API
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
description: |-
APIVersion defines the versioned schema of this representation of an object.
Servers should convert recognized schemas to the latest internal value, and
may reject unrecognized values.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
type: string
kind:
description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
description: |-
Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to.
Cannot be updated.
In CamelCase.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
type: string
metadata:
type: object
@ -37,20 +40,21 @@ spec:
description: PodProbeMarkerSpec defines the desired state of PodProbeMarker
properties:
probes:
description: Custom container probe, current only support Exec().
description: |-
Custom container probe, current only support Exec().
Probe Result will record in Pod.Status.Conditions, and condition.type=probe.name.
condition.status=True indicates probe success condition.status=False
indicates probe fails
condition.status=True indicates probe success
condition.status=False indicates probe fails
items:
properties:
containerName:
description: container name
type: string
markerPolicy:
description: 'According to the execution result of ContainerProbe,
perform specific actions, such as: patch Pod labels, annotations,
ReadinessGate Condition It cannot be null at the same time
as PodConditionType.'
description: |-
According to the execution result of ContainerProbe, perform specific actions,
such as: patch Pod labels, annotations, ReadinessGate Condition
It cannot be null at the same time as PodConditionType.
items:
properties:
annotations:
@ -64,12 +68,11 @@ spec:
description: Patch Labels pod.labels
type: object
state:
description: 'probe status, True or False For example:
State=Succeeded, annotations[controller.kubernetes.io/pod-deletion-cost]
= ''10''. State=Failed, annotations[controller.kubernetes.io/pod-deletion-cost]
= ''-10''. In addition, if State=Failed is not defined,
Exec execution fails, and the annotations[controller.kubernetes.io/pod-deletion-cost]
will be Deleted'
description: |-
probe status, True or False
For example: State=Succeeded, annotations[controller.kubernetes.io/pod-deletion-cost] = '10'.
State=Failed, annotations[controller.kubernetes.io/pod-deletion-cost] = '-10'.
In addition, if State=Failed is not defined, Exec execution fails, and the annotations[controller.kubernetes.io/pod-deletion-cost] will be Deleted
type: string
required:
- state
@ -80,47 +83,63 @@ spec:
different containers, they cannot be the same)
type: string
podConditionType:
description: If it is not empty, the Probe execution result
will be recorded on the Pod condition. It cannot be null at
the same time as MarkerPolicy. For example PodConditionType=game.kruise.io/healthy,
pod.status.condition.type = game.kruise.io/healthy. When probe
is Succeeded, pod.status.condition.status = True. Otherwise,
when the probe fails to execute, pod.status.condition.status
= False.
description: |-
If it is not empty, the Probe execution result will be recorded on the Pod condition.
It cannot be null at the same time as MarkerPolicy.
For example PodConditionType=game.kruise.io/healthy, pod.status.condition.type = game.kruise.io/healthy.
When probe is Succeeded, pod.status.condition.status = True. Otherwise, when the probe fails to execute, pod.status.condition.status = False.
type: string
probe:
description: container probe spec
properties:
exec:
description: One and only one of the following should be
specified. Exec specifies the action to take.
description: Exec specifies a command to execute in the
container.
properties:
command:
description: Command is the command line to execute
inside the container, the working directory for the
command is root ('/') in the container's filesystem.
The command is simply exec'd, it is not run inside
a shell, so traditional shell instructions ('|', etc)
won't work. To use a shell, you need to explicitly
call out to that shell. Exit status of 0 is treated
as live/healthy and non-zero is unhealthy.
description: |-
Command is the command line to execute inside the container, the working directory for the
command is root ('/') in the container's filesystem. The command is simply exec'd, it is
not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use
a shell, you need to explicitly call out to that shell.
Exit status of 0 is treated as live/healthy and non-zero is unhealthy.
items:
type: string
type: array
x-kubernetes-list-type: atomic
type: object
failureThreshold:
description: Minimum consecutive failures for the probe
to be considered failed after having succeeded. Defaults
to 3. Minimum value is 1.
description: |-
Minimum consecutive failures for the probe to be considered failed after having succeeded.
Defaults to 3. Minimum value is 1.
format: int32
type: integer
grpc:
description: GRPC specifies a GRPC HealthCheckRequest.
properties:
port:
description: Port number of the gRPC service. Number
must be in the range 1 to 65535.
format: int32
type: integer
service:
default: ""
description: |-
Service is the name of the service to place in the gRPC HealthCheckRequest
(see https://github.com/grpc/grpc/blob/master/doc/health-checking.md).
If this is not specified, the default behavior is defined by gRPC.
type: string
required:
- port
type: object
httpGet:
description: HTTPGet specifies the http request to perform.
description: HTTPGet specifies an HTTP GET request to perform.
properties:
host:
description: Host name to connect to, defaults to the
pod IP. You probably want to set "Host" in httpHeaders
instead.
description: |-
Host name to connect to, defaults to the pod IP. You probably want to set
"Host" in httpHeaders instead.
type: string
httpHeaders:
description: Custom headers to set in the request. HTTP
@ -130,7 +149,9 @@ spec:
to be used in HTTP probes
properties:
name:
description: The header field name
description: |-
The header field name.
This will be canonicalized upon output, so case-variant names will be understood as the same header.
type: string
value:
description: The header field value
@ -140,6 +161,7 @@ spec:
- value
type: object
type: array
x-kubernetes-list-type: atomic
path:
description: Path to access on the HTTP server.
type: string
@ -147,39 +169,39 @@ spec:
anyOf:
- type: integer
- type: string
description: Name or number of the port to access on
the container. Number must be in the range 1 to 65535.
description: |-
Name or number of the port to access on the container.
Number must be in the range 1 to 65535.
Name must be an IANA_SVC_NAME.
x-kubernetes-int-or-string: true
scheme:
description: Scheme to use for connecting to the host.
description: |-
Scheme to use for connecting to the host.
Defaults to HTTP.
type: string
required:
- port
type: object
initialDelaySeconds:
description: 'Number of seconds after the container has
started before liveness probes are initiated. More info:
https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
description: |-
Number of seconds after the container has started before liveness probes are initiated.
More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
format: int32
type: integer
periodSeconds:
description: How often (in seconds) to perform the probe.
description: |-
How often (in seconds) to perform the probe.
Default to 10 seconds. Minimum value is 1.
format: int32
type: integer
successThreshold:
description: Minimum consecutive successes for the probe
to be considered successful after having failed. Defaults
to 1. Must be 1 for liveness and startup. Minimum value
is 1.
description: |-
Minimum consecutive successes for the probe to be considered successful after having failed.
Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1.
format: int32
type: integer
tcpSocket:
description: 'TCPSocket specifies an action involving a
TCP port. TCP hooks not yet supported TODO: implement
a realistic TCP lifecycle hook'
description: TCPSocket specifies a connection to a TCP port.
properties:
host:
description: 'Optional: Host name to connect to, defaults
@ -189,34 +211,33 @@ spec:
anyOf:
- type: integer
- type: string
description: Number or name of the port to access on
the container. Number must be in the range 1 to 65535.
description: |-
Number or name of the port to access on the container.
Number must be in the range 1 to 65535.
Name must be an IANA_SVC_NAME.
x-kubernetes-int-or-string: true
required:
- port
type: object
terminationGracePeriodSeconds:
description: Optional duration in seconds the pod needs
to terminate gracefully upon probe failure. The grace
period is the duration in seconds after the processes
running in the pod are sent a termination signal and the
time when the processes are forcibly halted with a kill
signal. Set this value longer than the expected cleanup
time for your process. If this value is nil, the pod's
terminationGracePeriodSeconds will be used. Otherwise,
this value overrides the value provided by the pod spec.
Value must be non-negative integer. The value zero indicates
stop immediately via the kill signal (no opportunity to
shut down). This is a beta field and requires enabling
ProbeTerminationGracePeriod feature gate. Minimum value
is 1. spec.terminationGracePeriodSeconds is used if unset.
description: |-
Optional duration in seconds the pod needs to terminate gracefully upon probe failure.
The grace period is the duration in seconds after the processes running in the pod are sent
a termination signal and the time when the processes are forcibly halted with a kill signal.
Set this value longer than the expected cleanup time for your process.
If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this
value overrides the value provided by the pod spec.
Value must be non-negative integer. The value zero indicates stop immediately via
the kill signal (no opportunity to shut down).
This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate.
Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset.
format: int64
type: integer
timeoutSeconds:
description: 'Number of seconds after which the probe times
out. Defaults to 1 second. Minimum value is 1. More info:
https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
description: |-
Number of seconds after which the probe times out.
Defaults to 1 second. Minimum value is 1.
More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
format: int32
type: integer
type: object
@ -227,51 +248,54 @@ spec:
type: object
type: array
selector:
description: 'Selector is a label query over pods that should exec
custom probe It must match the pod template''s labels. More info:
https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors'
description: |-
Selector is a label query over pods that should exec custom probe
It must match the pod template's labels.
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
properties:
matchExpressions:
description: matchExpressions is a list of label selector requirements.
The requirements are ANDed.
items:
description: A label selector requirement is a selector that
contains values, a key, and an operator that relates the key
and values.
description: |-
A label selector requirement is a selector that contains values, a key, and an operator that
relates the key and values.
properties:
key:
description: key is the label key that the selector applies
to.
type: string
operator:
description: operator represents a key's relationship to
a set of values. Valid operators are In, NotIn, Exists
and DoesNotExist.
description: |-
operator represents a key's relationship to a set of values.
Valid operators are In, NotIn, Exists and DoesNotExist.
type: string
values:
description: values is an array of string values. If the
operator is In or NotIn, the values array must be non-empty.
If the operator is Exists or DoesNotExist, the values
array must be empty. This array is replaced during a strategic
description: |-
values is an array of string values. If the operator is In or NotIn,
the values array must be non-empty. If the operator is Exists or DoesNotExist,
the values array must be empty. This array is replaced during a strategic
merge patch.
items:
type: string
type: array
x-kubernetes-list-type: atomic
required:
- key
- operator
type: object
type: array
x-kubernetes-list-type: atomic
matchLabels:
additionalProperties:
type: string
description: matchLabels is a map of {key,value} pairs. A single
{key,value} in the matchLabels map is equivalent to an element
of matchExpressions, whose key field is "key", the operator
is "In", and the values array contains only "value". The requirements
are ANDed.
description: |-
matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
map is equivalent to an element of matchExpressions, whose key field is "key", the
operator is "In", and the values array contains only "value". The requirements are ANDed.
type: object
type: object
x-kubernetes-map-type: atomic
required:
- probes
- selector
@ -283,9 +307,9 @@ spec:
format: int64
type: integer
observedGeneration:
description: observedGeneration is the most recent generation observed
for this PodProbeMarker. It corresponds to the PodProbeMarker's
generation, which is updated on mutation by the API Server.
description: |-
observedGeneration is the most recent generation observed for this PodProbeMarker. It corresponds to the
PodProbeMarker's generation, which is updated on mutation by the API Server.
format: int64
type: integer
required:
@ -296,9 +320,3 @@ spec:
storage: true
subresources:
status: {}
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []

View File

@ -1,11 +1,9 @@
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.7.0
creationTimestamp: null
controller-gen.kubebuilder.io/version: v0.16.5
name: resourcedistributions.apps.kruise.io
spec:
group: apps.kruise.io
@ -38,14 +36,19 @@ spec:
API.
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
description: |-
APIVersion defines the versioned schema of this representation of an object.
Servers should convert recognized schemas to the latest internal value, and
may reject unrecognized values.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
type: string
kind:
description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
description: |-
Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to.
Cannot be updated.
In CamelCase.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
type: string
metadata:
type: object
@ -63,14 +66,14 @@ spec:
to.
properties:
allNamespaces:
description: If AllNamespaces is true, Resource will be distributed
to the all namespaces (except some forbidden namespaces, such
as "kube-system" and "kube-public").
description: |-
If AllNamespaces is true, Resource will be distributed to the all namespaces
(except some forbidden namespaces, such as "kube-system" and "kube-public").
type: boolean
excludedNamespaces:
description: If ExcludedNamespaces is not empty, Resource will
never be distributed to the listed namespaces. ExcludedNamespaces
has the highest priority.
description: |-
If ExcludedNamespaces is not empty, Resource will never be distributed to the listed namespaces.
ExcludedNamespaces has the highest priority.
properties:
list:
items:
@ -106,52 +109,54 @@ spec:
description: matchExpressions is a list of label selector
requirements. The requirements are ANDed.
items:
description: A label selector requirement is a selector
that contains values, a key, and an operator that relates
the key and values.
description: |-
A label selector requirement is a selector that contains values, a key, and an operator that
relates the key and values.
properties:
key:
description: key is the label key that the selector
applies to.
type: string
operator:
description: operator represents a key's relationship
to a set of values. Valid operators are In, NotIn,
Exists and DoesNotExist.
description: |-
operator represents a key's relationship to a set of values.
Valid operators are In, NotIn, Exists and DoesNotExist.
type: string
values:
description: values is an array of string values. If
the operator is In or NotIn, the values array must
be non-empty. If the operator is Exists or DoesNotExist,
the values array must be empty. This array is replaced
during a strategic merge patch.
description: |-
values is an array of string values. If the operator is In or NotIn,
the values array must be non-empty. If the operator is Exists or DoesNotExist,
the values array must be empty. This array is replaced during a strategic
merge patch.
items:
type: string
type: array
x-kubernetes-list-type: atomic
required:
- key
- operator
type: object
type: array
x-kubernetes-list-type: atomic
matchLabels:
additionalProperties:
type: string
description: matchLabels is a map of {key,value} pairs. A
single {key,value} in the matchLabels map is equivalent
to an element of matchExpressions, whose key field is "key",
the operator is "In", and the values array contains only
"value". The requirements are ANDed.
description: |-
matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
map is equivalent to an element of matchExpressions, whose key field is "key", the
operator is "In", and the values array contains only "value". The requirements are ANDed.
type: object
type: object
x-kubernetes-map-type: atomic
type: object
required:
- resource
- targets
type: object
status:
description: ResourceDistributionStatus defines the observed state of
ResourceDistribution. ResourceDistributionStatus is recorded by kruise,
users' modification is invalid and meaningless.
description: |-
ResourceDistributionStatus defines the observed state of ResourceDistribution.
ResourceDistributionStatus is recorded by kruise, users' modification is invalid and meaningless.
properties:
conditions:
description: Conditions describe the condition when Resource creating,
@ -209,9 +214,3 @@ spec:
storage: true
subresources:
status: {}
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []

View File

@ -1,11 +1,9 @@
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.7.0
creationTimestamp: null
controller-gen.kubebuilder.io/version: v0.16.5
name: sidecarsets.apps.kruise.io
spec:
group: apps.kruise.io
@ -42,14 +40,19 @@ spec:
description: SidecarSet is the Schema for the sidecarsets API
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
description: |-
APIVersion defines the versioned schema of this representation of an object.
Servers should convert recognized schemas to the latest internal value, and
may reject unrecognized values.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
type: string
kind:
description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
description: |-
Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to.
Cannot be updated.
In CamelCase.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
type: string
metadata:
type: object
@ -63,23 +66,34 @@ spec:
description: SidecarContainer defines the container of Sidecar
properties:
podInjectPolicy:
description: The rules that injected SidecarContainer into Pod.spec.containers,
not takes effect in initContainers If BeforeAppContainer,
the SidecarContainer will be injected in front of the pod.spec.containers
otherwise it will be injected into the back. default BeforeAppContainerType
description: |-
The rules that injected SidecarContainer into Pod.spec.containers,
not takes effect in initContainers
If BeforeAppContainer, the SidecarContainer will be injected in front of the pod.spec.containers
otherwise it will be injected into the back.
default BeforeAppContainerType
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:
description: If ShareVolumePolicy is enabled, the sidecar container
will share the other container's VolumeMounts in the pod(don't
contains the injected sidecar container).
description: |-
If ShareVolumePolicy is enabled, the sidecar container will share the other container's VolumeMounts
in the pod(not including the injected sidecar container).
properties:
type:
type: string
type: object
transferEnv:
description: TransferEnv will transfer env info from other container
SourceContainerName is pod.spec.container[x].name; EnvName
is pod.spec.container[x].Env.name
description: |-
TransferEnv will transfer env info from other container
SourceContainerName is pod.spec.container[x].name; EnvName is pod.spec.container[x].Env.name
items:
properties:
envName:
@ -107,6 +121,7 @@ spec:
required:
- fieldPath
type: object
x-kubernetes-map-type: atomic
type: object
type: object
type: array
@ -115,16 +130,17 @@ spec:
HotUpgrade'
properties:
hotUpgradeEmptyImage:
description: when HotUpgrade, HotUpgradeEmptyImage is used
to complete the hot upgrading process HotUpgradeEmptyImage
is consistent of sidecar container in Command, Args, Liveness
probe, etc. but it does no actual work.
description: |-
when HotUpgrade, HotUpgradeEmptyImage is used to complete the hot upgrading process
HotUpgradeEmptyImage is consistent of sidecar container in Command, Args, Liveness probe, etc.
but it does no actual work.
type: string
upgradeType:
description: when sidecar container is stateless, use ColdUpgrade
otherwise HotUpgrade are more HotUpgrade. examples for
istio envoy container is suitable for HotUpgrade default
is ColdUpgrade
description: |-
when sidecar container is stateless, use ColdUpgrade
otherwise HotUpgrade are more HotUpgrade.
examples for istio envoy container is suitable for HotUpgrade
default is ColdUpgrade
type: string
type: object
type: object
@ -134,41 +150,59 @@ spec:
description: List of the names of secrets required by pulling sidecar
container images
items:
description: LocalObjectReference contains enough information to
let you locate the referenced object inside the same namespace.
description: |-
LocalObjectReference contains enough information to let you locate the
referenced object inside the same namespace.
properties:
name:
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
TODO: Add other useful fields. apiVersion, kind, uid?'
default: ""
description: |-
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
type: string
type: object
x-kubernetes-map-type: atomic
type: array
initContainers:
description: InitContainers is the list of init containers to be injected
into the selected pod We will inject those containers by their name
in ascending order We only inject init containers when a new pod
is created, it does not apply to any existing pod
description: |-
InitContainers is the list of init containers to be injected into the selected pod
We will inject those containers by their name in ascending order
We only inject init containers when a new pod is created, it does not apply to any existing pod
items:
description: SidecarContainer defines the container of Sidecar
properties:
podInjectPolicy:
description: The rules that injected SidecarContainer into Pod.spec.containers,
not takes effect in initContainers If BeforeAppContainer,
the SidecarContainer will be injected in front of the pod.spec.containers
otherwise it will be injected into the back. default BeforeAppContainerType
description: |-
The rules that injected SidecarContainer into Pod.spec.containers,
not takes effect in initContainers
If BeforeAppContainer, the SidecarContainer will be injected in front of the pod.spec.containers
otherwise it will be injected into the back.
default BeforeAppContainerType
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:
description: If ShareVolumePolicy is enabled, the sidecar container
will share the other container's VolumeMounts in the pod(don't
contains the injected sidecar container).
description: |-
If ShareVolumePolicy is enabled, the sidecar container will share the other container's VolumeMounts
in the pod(not including the injected sidecar container).
properties:
type:
type: string
type: object
transferEnv:
description: TransferEnv will transfer env info from other container
SourceContainerName is pod.spec.container[x].name; EnvName
is pod.spec.container[x].Env.name
description: |-
TransferEnv will transfer env info from other container
SourceContainerName is pod.spec.container[x].name; EnvName is pod.spec.container[x].Env.name
items:
properties:
envName:
@ -196,6 +230,7 @@ spec:
required:
- fieldPath
type: object
x-kubernetes-map-type: atomic
type: object
type: object
type: array
@ -204,16 +239,17 @@ spec:
HotUpgrade'
properties:
hotUpgradeEmptyImage:
description: when HotUpgrade, HotUpgradeEmptyImage is used
to complete the hot upgrading process HotUpgradeEmptyImage
is consistent of sidecar container in Command, Args, Liveness
probe, etc. but it does no actual work.
description: |-
when HotUpgrade, HotUpgradeEmptyImage is used to complete the hot upgrading process
HotUpgradeEmptyImage is consistent of sidecar container in Command, Args, Liveness probe, etc.
but it does no actual work.
type: string
upgradeType:
description: when sidecar container is stateless, use ColdUpgrade
otherwise HotUpgrade are more HotUpgrade. examples for
istio envoy container is suitable for HotUpgrade default
is ColdUpgrade
description: |-
when sidecar container is stateless, use ColdUpgrade
otherwise HotUpgrade are more HotUpgrade.
examples for istio envoy container is suitable for HotUpgrade
default is ColdUpgrade
type: string
type: object
type: object
@ -224,26 +260,30 @@ spec:
is injected into pods
properties:
paused:
description: Paused indicates that SidecarSet will suspend injection
into Pods If Paused is true, the sidecarSet will not be injected
to newly created Pods, but the injected sidecar container remains
updating and running. default is false
description: |-
Paused indicates that SidecarSet will suspend injection into Pods
If Paused is true, the sidecarSet will not be injected to newly created Pods,
but the injected sidecar container remains updating and running.
default is false
type: boolean
revision:
description: Revision can help users rolling update SidecarSet
safely. If users set this filed, SidecarSet will try to inject
specific revision according to different policies.
description: |-
Revision can help users rolling update SidecarSet safely. If users set
this filed, SidecarSet will try to inject specific revision according to
different policies.
properties:
customVersion:
description: CustomVersion corresponds to label 'apps.kruise.io/sidecarset-custom-version'
of (History) SidecarSet. SidecarSet will select the specific
ControllerRevision via this CustomVersion, and then restore
the history SidecarSet to inject specific version of the
sidecar to pods.
description: |-
CustomVersion corresponds to label 'apps.kruise.io/sidecarset-custom-version' of (History) SidecarSet.
SidecarSet will select the specific ControllerRevision via this CustomVersion, and then restore the
history SidecarSet to inject specific version of the sidecar to pods.
type: string
policy:
default: Always
description: Policy describes the behavior of revision injection.
Defaults to Always.
enum:
- Always
- Partial
type: string
revisionName:
description: RevisionName corresponds to a specific ControllerRevision
@ -252,54 +292,58 @@ spec:
type: object
type: object
namespace:
description: Namespace sidecarSet will only match the pods in the
namespace otherwise, match pods in all namespaces(in cluster)
description: |-
Namespace sidecarSet will only match the pods in the namespace
otherwise, match pods in all namespaces(in cluster)
type: string
namespaceSelector:
description: NamespaceSelector select which namespaces to inject sidecar
containers. Default to the empty LabelSelector, which matches everything.
description: |-
NamespaceSelector select which namespaces to inject sidecar containers.
Default to the empty LabelSelector, which matches everything.
properties:
matchExpressions:
description: matchExpressions is a list of label selector requirements.
The requirements are ANDed.
items:
description: A label selector requirement is a selector that
contains values, a key, and an operator that relates the key
and values.
description: |-
A label selector requirement is a selector that contains values, a key, and an operator that
relates the key and values.
properties:
key:
description: key is the label key that the selector applies
to.
type: string
operator:
description: operator represents a key's relationship to
a set of values. Valid operators are In, NotIn, Exists
and DoesNotExist.
description: |-
operator represents a key's relationship to a set of values.
Valid operators are In, NotIn, Exists and DoesNotExist.
type: string
values:
description: values is an array of string values. If the
operator is In or NotIn, the values array must be non-empty.
If the operator is Exists or DoesNotExist, the values
array must be empty. This array is replaced during a strategic
description: |-
values is an array of string values. If the operator is In or NotIn,
the values array must be non-empty. If the operator is Exists or DoesNotExist,
the values array must be empty. This array is replaced during a strategic
merge patch.
items:
type: string
type: array
x-kubernetes-list-type: atomic
required:
- key
- operator
type: object
type: array
x-kubernetes-list-type: atomic
matchLabels:
additionalProperties:
type: string
description: matchLabels is a map of {key,value} pairs. A single
{key,value} in the matchLabels map is equivalent to an element
of matchExpressions, whose key field is "key", the operator
is "In", and the values array contains only "value". The requirements
are ANDed.
description: |-
matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
map is equivalent to an element of matchExpressions, whose key field is "key", the
operator is "In", and the values array contains only "value". The requirements are ANDed.
type: object
type: object
x-kubernetes-map-type: atomic
patchPodMetadata:
description: SidecarSet support to inject & in-place update metadata
in pod.
@ -311,14 +355,16 @@ spec:
description: annotations
type: object
patchPolicy:
description: labels map[string]string `json:"labels,omitempty"`
description: |-
labels map[string]string `json:"labels,omitempty"`
patch pod metadata policy, Default is "Retain"
type: string
type: object
type: array
revisionHistoryLimit:
description: RevisionHistoryLimit indicates the maximum quantity of
stored revisions about the SidecarSet. default value is 10
description: |-
RevisionHistoryLimit indicates the maximum quantity of stored revisions about the SidecarSet.
default value is 10
format: int32
type: integer
selector:
@ -328,43 +374,45 @@ spec:
description: matchExpressions is a list of label selector requirements.
The requirements are ANDed.
items:
description: A label selector requirement is a selector that
contains values, a key, and an operator that relates the key
and values.
description: |-
A label selector requirement is a selector that contains values, a key, and an operator that
relates the key and values.
properties:
key:
description: key is the label key that the selector applies
to.
type: string
operator:
description: operator represents a key's relationship to
a set of values. Valid operators are In, NotIn, Exists
and DoesNotExist.
description: |-
operator represents a key's relationship to a set of values.
Valid operators are In, NotIn, Exists and DoesNotExist.
type: string
values:
description: values is an array of string values. If the
operator is In or NotIn, the values array must be non-empty.
If the operator is Exists or DoesNotExist, the values
array must be empty. This array is replaced during a strategic
description: |-
values is an array of string values. If the operator is In or NotIn,
the values array must be non-empty. If the operator is Exists or DoesNotExist,
the values array must be empty. This array is replaced during a strategic
merge patch.
items:
type: string
type: array
x-kubernetes-list-type: atomic
required:
- key
- operator
type: object
type: array
x-kubernetes-list-type: atomic
matchLabels:
additionalProperties:
type: string
description: matchLabels is a map of {key,value} pairs. A single
{key,value} in the matchLabels map is equivalent to an element
of matchExpressions, whose key field is "key", the operator
is "In", and the values array contains only "value". The requirements
are ANDed.
description: |-
matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
map is equivalent to an element of matchExpressions, whose key field is "key", the
operator is "In", and the values array contains only "value". The requirements are ANDed.
type: object
type: object
x-kubernetes-map-type: atomic
updateStrategy:
description: The sidecarset updateStrategy to use to replace existing
pods with new ones.
@ -373,36 +421,128 @@ spec:
anyOf:
- type: integer
- type: string
description: 'The maximum number of SidecarSet pods that can be
unavailable during the update. Value can be an absolute number
(ex: 5) or a percentage of total number of SidecarSet pods at
the start of the update (ex: 10%). Absolute number is calculated
from percentage by rounding up. This cannot be 0. Default value
is 1.'
description: |-
The maximum number of SidecarSet pods that can be unavailable during the
update. Value can be an absolute number (ex: 5) or a percentage of total
number of SidecarSet pods at the start of the update (ex: 10%). Absolute
number is calculated from percentage by rounding up.
This cannot be 0.
Default value is 1.
x-kubernetes-int-or-string: true
partition:
anyOf:
- type: integer
- type: string
description: Partition is the desired number of pods in old revisions.
It means when partition is set during pods updating, (replicas
- partition) number of pods will be updated. Default value is
0.
description: |-
Partition is the desired number of pods in old revisions. It means when partition
is set during pods updating, (replicas - partition) number of pods will be updated.
Default value is 0.
x-kubernetes-int-or-string: true
paused:
description: Paused indicates that the SidecarSet is paused to
update the injected pods, but it don't affect the webhook inject
sidecar container into the newly created pods. default is false
description: |-
Paused indicates that the SidecarSet is paused to update the injected pods,
For the impact on the injection behavior for newly created Pods, please refer to the comments of Selector.
type: boolean
priorityStrategy:
description: |-
Priorities are the rules for calculating the priority of updating pods.
Each pod to be updated, will pass through these terms and get a sum of weights.
properties:
orderPriority:
description: |-
Order priority terms, pods will be sorted by the value of orderedKey.
For example:
```
orderPriority:
- orderedKey: key1
- orderedKey: key2
```
First, all pods which have key1 in labels will be sorted by the value of key1.
Then, the left pods which have no key1 but have key2 in labels will be sorted by
the value of key2 and put behind those pods have key1.
items:
description: UpdatePriorityOrderTerm defines order priority.
properties:
orderedKey:
description: |-
Calculate priority by value of this key.
Values of this key, will be sorted by GetInt(val). GetInt method will find the last int in value,
such as getting 5 in value '5', getting 10 in value 'sts-10'.
type: string
required:
- orderedKey
type: object
type: array
weightPriority:
description: Weight priority terms, pods will be sorted by
the sum of all terms weight.
items:
description: UpdatePriorityWeightTerm defines weight priority.
properties:
matchSelector:
description: MatchSelector is used to select by pod's
labels.
properties:
matchExpressions:
description: matchExpressions is a list of label
selector requirements. The requirements are ANDed.
items:
description: |-
A label selector requirement is a selector that contains values, a key, and an operator that
relates the key and values.
properties:
key:
description: key is the label key that the
selector applies to.
type: string
operator:
description: |-
operator represents a key's relationship to a set of values.
Valid operators are In, NotIn, Exists and DoesNotExist.
type: string
values:
description: |-
values is an array of string values. If the operator is In or NotIn,
the values array must be non-empty. If the operator is Exists or DoesNotExist,
the values array must be empty. This array is replaced during a strategic
merge patch.
items:
type: string
type: array
x-kubernetes-list-type: atomic
required:
- key
- operator
type: object
type: array
x-kubernetes-list-type: atomic
matchLabels:
additionalProperties:
type: string
description: |-
matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
map is equivalent to an element of matchExpressions, whose key field is "key", the
operator is "In", and the values array contains only "value". The requirements are ANDed.
type: object
type: object
x-kubernetes-map-type: atomic
weight:
description: Weight associated with matching the corresponding
matchExpressions, in the range 1-100.
format: int32
type: integer
required:
- matchSelector
- weight
type: object
type: array
type: object
scatterStrategy:
description: ScatterStrategy defines the scatter rules to make
pods been scattered when update. This will avoid pods with the
same key-value to be updated in one batch. - Note that pods
will be scattered after priority sort. So, although priority
strategy and scatter strategy can be applied together, we suggest
to use either one of them. - If scatterStrategy is used, we
suggest to just use one term. Otherwise, the update order can
be hard to understand.
description: |-
ScatterStrategy defines the scatter rules to make pods been scattered when update.
This will avoid pods with the same key-value to be updated in one batch.
- Note that pods will be scattered after priority sort. So, although priority strategy and scatter strategy can be applied together, we suggest to use either one of them.
- If scatterStrategy is used, we suggest to just use one term. Otherwise, the update order can be hard to understand.
items:
properties:
key:
@ -415,56 +555,63 @@ spec:
type: object
type: array
selector:
description: If selector is not nil, this upgrade will only update
the selected pods.
description: |-
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
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,
which is consistent with previous versions.
properties:
matchExpressions:
description: matchExpressions is a list of label selector
requirements. The requirements are ANDed.
items:
description: A label selector requirement is a selector
that contains values, a key, and an operator that relates
the key and values.
description: |-
A label selector requirement is a selector that contains values, a key, and an operator that
relates the key and values.
properties:
key:
description: key is the label key that the selector
applies to.
type: string
operator:
description: operator represents a key's relationship
to a set of values. Valid operators are In, NotIn,
Exists and DoesNotExist.
description: |-
operator represents a key's relationship to a set of values.
Valid operators are In, NotIn, Exists and DoesNotExist.
type: string
values:
description: values is an array of string values. If
the operator is In or NotIn, the values array must
be non-empty. If the operator is Exists or DoesNotExist,
the values array must be empty. This array is replaced
during a strategic merge patch.
description: |-
values is an array of string values. If the operator is In or NotIn,
the values array must be non-empty. If the operator is Exists or DoesNotExist,
the values array must be empty. This array is replaced during a strategic
merge patch.
items:
type: string
type: array
x-kubernetes-list-type: atomic
required:
- key
- operator
type: object
type: array
x-kubernetes-list-type: atomic
matchLabels:
additionalProperties:
type: string
description: matchLabels is a map of {key,value} pairs. A
single {key,value} in the matchLabels map is equivalent
to an element of matchExpressions, whose key field is "key",
the operator is "In", and the values array contains only
"value". The requirements are ANDed.
description: |-
matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
map is equivalent to an element of matchExpressions, whose key field is "key", the
operator is "In", and the values array contains only "value". The requirements are ANDed.
type: object
type: object
x-kubernetes-map-type: atomic
type:
description: Type is NotUpdate, the SidecarSet don't update the
injected pods, it will only inject sidecar container into the
newly created pods. Type is RollingUpdate, the SidecarSet will
update the injected pods to the latest version on RollingUpdate
Strategy. default is RollingUpdate
description: |-
Type is NotUpdate, the SidecarSet don't update the injected pods,
it will only inject sidecar container into the newly created pods.
Type is RollingUpdate, the SidecarSet will update the injected pods to the latest version on RollingUpdate Strategy.
default is RollingUpdate
type: string
type: object
volumes:
@ -475,10 +622,10 @@ spec:
description: SidecarSetStatus defines the observed state of SidecarSet
properties:
collisionCount:
description: CollisionCount is the count of hash collisions for the
SidecarSet. The SidecarSet controller uses this field as a collision
avoidance mechanism when it needs to create the name for the newest
ControllerRevision.
description: |-
CollisionCount is the count of hash collisions for the SidecarSet. The SidecarSet controller
uses this field as a collision avoidance mechanism when it needs to create the name for the
newest ControllerRevision.
format: int32
type: integer
latestRevision:
@ -492,9 +639,9 @@ spec:
format: int32
type: integer
observedGeneration:
description: observedGeneration is the most recent generation observed
for this SidecarSet. It corresponds to the SidecarSet's generation,
which is updated on mutation by the API Server.
description: |-
observedGeneration is the most recent generation observed for this SidecarSet. It corresponds to the
SidecarSet's generation, which is updated on mutation by the API Server.
format: int64
type: integer
readyPods:
@ -522,9 +669,3 @@ spec:
storage: true
subresources:
status: {}
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,11 +1,9 @@
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.7.0
creationTimestamp: null
controller-gen.kubebuilder.io/version: v0.16.5
name: workloadspreads.apps.kruise.io
spec:
group: apps.kruise.io
@ -38,14 +36,19 @@ spec:
description: WorkloadSpread is the Schema for the WorkloadSpread API
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
description: |-
APIVersion defines the versioned schema of this representation of an object.
Servers should convert recognized schemas to the latest internal value, and
may reject unrecognized values.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
type: string
kind:
description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
description: |-
Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to.
Cannot be updated.
In CamelCase.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
type: string
metadata:
type: object
@ -61,25 +64,23 @@ spec:
is AdaptiveWorkloadSpreadScheduleStrategyType.
properties:
disableSimulationSchedule:
description: DisableSimulationSchedule indicates whether to
disable the feature of simulation schedule. Default is false.
Webhook can take a simple general predicates to check whether
Pod can be scheduled into this subset, but it just considers
the Node resource and cannot replace scheduler to do richer
predicates practically.
description: |-
DisableSimulationSchedule indicates whether to disable the feature of simulation schedule.
Default is false.
Webhook can take a simple general predicates to check whether Pod can be scheduled into this subset,
but it just considers the Node resource and cannot replace scheduler to do richer predicates practically.
type: boolean
rescheduleCriticalSeconds:
description: RescheduleCriticalSeconds indicates how long
controller will reschedule a schedule failed Pod to the
subset that has redundant capacity after the subset where
the Pod lives. If a Pod was scheduled failed and still in
a unschedulabe status over RescheduleCriticalSeconds duration,
the controller will reschedule it to a suitable subset.
description: |-
RescheduleCriticalSeconds indicates how long controller will reschedule a schedule failed Pod to the subset that has
redundant capacity after the subset where the Pod lives. If a Pod was scheduled failed and still in a unschedulabe status
over RescheduleCriticalSeconds duration, the controller will reschedule it to a suitable subset.
format: int32
type: integer
type: object
type:
description: Type indicates the type of the WorkloadSpreadScheduleStrategy.
description: |-
Type indicates the type of the WorkloadSpreadScheduleStrategy.
Default is Fixed
enum:
- Adaptive
@ -111,10 +112,9 @@ spec:
description: Indicates the node preferred selector to form the
subset.
items:
description: An empty preferred scheduling term matches all
objects with implicit weight 0 (i.e. it's a no-op). A null
preferred scheduling term matches no objects (i.e. is also
a no-op).
description: |-
An empty preferred scheduling term matches all objects with implicit weight 0
(i.e. it's a no-op). A null preferred scheduling term matches no objects (i.e. is also a no-op).
properties:
preference:
description: A node selector term, associated with the
@ -124,71 +124,72 @@ spec:
description: A list of node selector requirements
by node's labels.
items:
description: A node selector requirement is a selector
that contains values, a key, and an operator that
relates the key and values.
description: |-
A node selector requirement is a selector that contains values, a key, and an operator
that relates the key and values.
properties:
key:
description: The label key that the selector
applies to.
type: string
operator:
description: Represents a key's relationship
to a set of values. Valid operators are In,
NotIn, Exists, DoesNotExist. Gt, and Lt.
description: |-
Represents a key's relationship to a set of values.
Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.
type: string
values:
description: An array of string values. If the
operator is In or NotIn, the values array
must be non-empty. If the operator is Exists
or DoesNotExist, the values array must be
empty. If the operator is Gt or Lt, the values
array must have a single element, which will
be interpreted as an integer. This array is
replaced during a strategic merge patch.
description: |-
An array of string values. If the operator is In or NotIn,
the values array must be non-empty. If the operator is Exists or DoesNotExist,
the values array must be empty. If the operator is Gt or Lt, the values
array must have a single element, which will be interpreted as an integer.
This array is replaced during a strategic merge patch.
items:
type: string
type: array
x-kubernetes-list-type: atomic
required:
- key
- operator
type: object
type: array
x-kubernetes-list-type: atomic
matchFields:
description: A list of node selector requirements
by node's fields.
items:
description: A node selector requirement is a selector
that contains values, a key, and an operator that
relates the key and values.
description: |-
A node selector requirement is a selector that contains values, a key, and an operator
that relates the key and values.
properties:
key:
description: The label key that the selector
applies to.
type: string
operator:
description: Represents a key's relationship
to a set of values. Valid operators are In,
NotIn, Exists, DoesNotExist. Gt, and Lt.
description: |-
Represents a key's relationship to a set of values.
Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.
type: string
values:
description: An array of string values. If the
operator is In or NotIn, the values array
must be non-empty. If the operator is Exists
or DoesNotExist, the values array must be
empty. If the operator is Gt or Lt, the values
array must have a single element, which will
be interpreted as an integer. This array is
replaced during a strategic merge patch.
description: |-
An array of string values. If the operator is In or NotIn,
the values array must be non-empty. If the operator is Exists or DoesNotExist,
the values array must be empty. If the operator is Gt or Lt, the values
array must have a single element, which will be interpreted as an integer.
This array is replaced during a strategic merge patch.
items:
type: string
type: array
x-kubernetes-list-type: atomic
required:
- key
- operator
type: object
type: array
x-kubernetes-list-type: atomic
type: object
x-kubernetes-map-type: atomic
weight:
description: Weight associated with matching the corresponding
nodeSelectorTerm, in the range 1-100.
@ -207,109 +208,109 @@ spec:
description: A list of node selector requirements by node's
labels.
items:
description: A node selector requirement is a selector
that contains values, a key, and an operator that relates
the key and values.
description: |-
A node selector requirement is a selector that contains values, a key, and an operator
that relates the key and values.
properties:
key:
description: The label key that the selector applies
to.
type: string
operator:
description: Represents a key's relationship to a
set of values. Valid operators are In, NotIn, Exists,
DoesNotExist. Gt, and Lt.
description: |-
Represents a key's relationship to a set of values.
Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.
type: string
values:
description: An array of string values. If the operator
is In or NotIn, the values array must be non-empty.
If the operator is Exists or DoesNotExist, the values
array must be empty. If the operator is Gt or Lt,
the values array must have a single element, which
will be interpreted as an integer. This array is
replaced during a strategic merge patch.
description: |-
An array of string values. If the operator is In or NotIn,
the values array must be non-empty. If the operator is Exists or DoesNotExist,
the values array must be empty. If the operator is Gt or Lt, the values
array must have a single element, which will be interpreted as an integer.
This array is replaced during a strategic merge patch.
items:
type: string
type: array
x-kubernetes-list-type: atomic
required:
- key
- operator
type: object
type: array
x-kubernetes-list-type: atomic
matchFields:
description: A list of node selector requirements by node's
fields.
items:
description: A node selector requirement is a selector
that contains values, a key, and an operator that relates
the key and values.
description: |-
A node selector requirement is a selector that contains values, a key, and an operator
that relates the key and values.
properties:
key:
description: The label key that the selector applies
to.
type: string
operator:
description: Represents a key's relationship to a
set of values. Valid operators are In, NotIn, Exists,
DoesNotExist. Gt, and Lt.
description: |-
Represents a key's relationship to a set of values.
Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.
type: string
values:
description: An array of string values. If the operator
is In or NotIn, the values array must be non-empty.
If the operator is Exists or DoesNotExist, the values
array must be empty. If the operator is Gt or Lt,
the values array must have a single element, which
will be interpreted as an integer. This array is
replaced during a strategic merge patch.
description: |-
An array of string values. If the operator is In or NotIn,
the values array must be non-empty. If the operator is Exists or DoesNotExist,
the values array must be empty. If the operator is Gt or Lt, the values
array must have a single element, which will be interpreted as an integer.
This array is replaced during a strategic merge patch.
items:
type: string
type: array
x-kubernetes-list-type: atomic
required:
- key
- operator
type: object
type: array
x-kubernetes-list-type: atomic
type: object
x-kubernetes-map-type: atomic
tolerations:
description: Indicates the tolerations the pods under this subset
have.
items:
description: The pod this Toleration is attached to tolerates
any taint that matches the triple <key,value,effect> using
the matching operator <operator>.
description: |-
The pod this Toleration is attached to tolerates any taint that matches
the triple <key,value,effect> using the matching operator <operator>.
properties:
effect:
description: Effect indicates the taint effect to match.
Empty means match all taint effects. When specified,
allowed values are NoSchedule, PreferNoSchedule and
NoExecute.
description: |-
Effect indicates the taint effect to match. Empty means match all taint effects.
When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute.
type: string
key:
description: Key is the taint key that the toleration
applies to. Empty means match all taint keys. If the
key is empty, operator must be Exists; this combination
means to match all values and all keys.
description: |-
Key is the taint key that the toleration applies to. Empty means match all taint keys.
If the key is empty, operator must be Exists; this combination means to match all values and all keys.
type: string
operator:
description: Operator represents a key's relationship
to the value. Valid operators are Exists and Equal.
Defaults to Equal. Exists is equivalent to wildcard
for value, so that a pod can tolerate all taints of
a particular category.
description: |-
Operator represents a key's relationship to the value.
Valid operators are Exists and Equal. Defaults to Equal.
Exists is equivalent to wildcard for value, so that a pod can
tolerate all taints of a particular category.
type: string
tolerationSeconds:
description: TolerationSeconds represents the period of
time the toleration (which must be of effect NoExecute,
otherwise this field is ignored) tolerates the taint.
By default, it is not set, which means tolerate the
taint forever (do not evict). Zero and negative values
will be treated as 0 (evict immediately) by the system.
description: |-
TolerationSeconds represents the period of time the toleration (which must be
of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default,
it is not set, which means tolerate the taint forever (do not evict). Zero and
negative values will be treated as 0 (evict immediately) by the system.
format: int64
type: integer
value:
description: Value is the taint value the toleration matches
to. If the operator is Exists, the value should be empty,
otherwise just a regular string.
description: |-
Value is the taint value the toleration matches to.
If the operator is Exists, the value should be empty, otherwise just a regular string.
type: string
type: object
type: array
@ -317,6 +318,70 @@ spec:
- name
type: object
type: array
targetFilter:
description: |-
TargetFilter allows WorkloadSpread to manage only a portion of the Pods in the TargetReference:
by specifying the criteria for the Pods to be managed through a label selector,
and by specifying how to obtain the total number of these selected Pods from the workload using replicasPaths.
properties:
replicasPathList:
description: |-
ReplicasPathList is a list of resource paths used to specify how to determine the total number of replicas of
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.
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.
items:
type: string
type: array
selector:
description: Selector is used to filter the Pods to be managed.
properties:
matchExpressions:
description: matchExpressions is a list of label selector
requirements. The requirements are ANDed.
items:
description: |-
A label selector requirement is a selector that contains values, a key, and an operator that
relates the key and values.
properties:
key:
description: key is the label key that the selector
applies to.
type: string
operator:
description: |-
operator represents a key's relationship to a set of values.
Valid operators are In, NotIn, Exists and DoesNotExist.
type: string
values:
description: |-
values is an array of string values. If the operator is In or NotIn,
the values array must be non-empty. If the operator is Exists or DoesNotExist,
the values array must be empty. This array is replaced during a strategic
merge patch.
items:
type: string
type: array
x-kubernetes-list-type: atomic
required:
- key
- operator
type: object
type: array
x-kubernetes-list-type: atomic
matchLabels:
additionalProperties:
type: string
description: |-
matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
map is equivalent to an element of matchExpressions, whose key field is "key", the
operator is "In", and the values array contains only "value". The requirements are ANDed.
type: object
type: object
x-kubernetes-map-type: atomic
type: object
targetRef:
description: TargetReference is the target workload that WorkloadSpread
want to control.
@ -343,9 +408,9 @@ spec:
description: WorkloadSpreadStatus defines the observed state of WorkloadSpread.
properties:
observedGeneration:
description: ObservedGeneration is the most recent generation observed
for this WorkloadSpread. It corresponds to the WorkloadSpread's
generation, which is updated on mutation by the API Server.
description: |-
ObservedGeneration is the most recent generation observed for this WorkloadSpread. It corresponds to the
WorkloadSpread's generation, which is updated on mutation by the API Server.
format: int64
type: integer
subsetStatuses:
@ -388,18 +453,17 @@ spec:
additionalProperties:
format: date-time
type: string
description: CreatingPods contains information about pods whose
creation was processed by the webhook handler but not yet
been observed by the WorkloadSpread controller. A pod will
be in this map from the time when the webhook handler processed
the creation request to the time when the pod is seen by controller.
The key in the map is the name of the pod and the value is
the time when the webhook handler process the creation request.
If the real creation didn't happen and a pod is still in this
map, it will be removed from the list automatically by WorkloadSpread
controller after some time. If everything goes smooth this
map should be empty for the most of the time. Large number
of entries in the map may indicate problems with pod creations.
description: |-
CreatingPods contains information about pods whose creation was processed by
the webhook handler but not yet been observed by the WorkloadSpread controller.
A pod will be in this map from the time when the webhook handler processed the
creation request to the time when the pod is seen by controller.
The key in the map is the name of the pod and the value is the time when the webhook
handler process the creation request. If the real creation didn't happen and a pod is
still in this map, it will be removed from the list automatically by WorkloadSpread controller
after some time.
If everything goes smooth this map should be empty for the most of the time.
Large number of entries in the map may indicate problems with pod creations.
type: object
deletingPods:
additionalProperties:
@ -409,13 +473,11 @@ spec:
contains information about pod deletion.
type: object
missingReplicas:
description: MissingReplicas is the number of active replicas
belong to this subset not be found. MissingReplicas > 0 indicates
the subset is still missing MissingReplicas pods to create
MissingReplicas = 0 indicates the subset already has enough
pods, there is no need to create MissingReplicas = -1 indicates
the subset's MaxReplicas not set, then there is no limit for
pods number
description: |-
MissingReplicas is the number of active replicas belong to this subset not be found.
MissingReplicas > 0 indicates the subset is still missing MissingReplicas pods to create
MissingReplicas = 0 indicates the subset already has enough pods, there is no need to create
MissingReplicas = -1 indicates the subset's MaxReplicas not set, then there is no limit for pods number
format: int32
type: integer
name:
@ -433,15 +495,95 @@ spec:
- replicas
type: object
type: array
versionedSubsetStatuses:
additionalProperties:
items:
description: WorkloadSpreadSubsetStatus defines the observed state
of subset
properties:
conditions:
description: Conditions is an array of current observed subset
conditions.
items:
properties:
lastTransitionTime:
description: Last time the condition transitioned from
one status to another.
format: date-time
type: string
message:
description: A human readable message indicating details
about the transition.
type: string
reason:
description: The reason for the condition's last transition.
type: string
status:
description: Status of the condition, one of True, False,
Unknown.
type: string
type:
description: Type of in place set condition.
type: string
required:
- status
- type
type: object
type: array
creatingPods:
additionalProperties:
format: date-time
type: string
description: |-
CreatingPods contains information about pods whose creation was processed by
the webhook handler but not yet been observed by the WorkloadSpread controller.
A pod will be in this map from the time when the webhook handler processed the
creation request to the time when the pod is seen by controller.
The key in the map is the name of the pod and the value is the time when the webhook
handler process the creation request. If the real creation didn't happen and a pod is
still in this map, it will be removed from the list automatically by WorkloadSpread controller
after some time.
If everything goes smooth this map should be empty for the most of the time.
Large number of entries in the map may indicate problems with pod creations.
type: object
deletingPods:
additionalProperties:
format: date-time
type: string
description: DeletingPods is similar with CreatingPods and
it contains information about pod deletion.
type: object
missingReplicas:
description: |-
MissingReplicas is the number of active replicas belong to this subset not be found.
MissingReplicas > 0 indicates the subset is still missing MissingReplicas pods to create
MissingReplicas = 0 indicates the subset already has enough pods, there is no need to create
MissingReplicas = -1 indicates the subset's MaxReplicas not set, then there is no limit for pods number
format: int32
type: integer
name:
description: Name should be unique between all of the subsets
under one WorkloadSpread.
type: string
replicas:
description: Replicas is the most recently observed number
of active replicas for subset.
format: int32
type: integer
required:
- missingReplicas
- name
- replicas
type: object
type: array
description: |-
VersionedSubsetStatuses is to solve rolling-update problems, where the creation of new-version pod
may be earlier than deletion of old-version pod. We have to calculate the pod subset distribution for
each version.
type: object
type: object
type: object
served: true
storage: true
subresources:
status: {}
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []

View File

@ -1,11 +1,9 @@
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.7.0
creationTimestamp: null
controller-gen.kubebuilder.io/version: v0.16.5
name: podunavailablebudgets.policy.kruise.io
spec:
group: policy.kruise.io
@ -43,14 +41,19 @@ spec:
API
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
description: |-
APIVersion defines the versioned schema of this representation of an object.
Servers should convert recognized schemas to the latest internal value, and
may reject unrecognized values.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
type: string
kind:
description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
description: |-
Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to.
Cannot be updated.
In CamelCase.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
type: string
metadata:
type: object
@ -61,20 +64,18 @@ spec:
anyOf:
- type: integer
- type: string
description: Delete pod, evict pod or update pod specification is
allowed if at most "maxUnavailable" pods selected by "selector"
or "targetRef" are unavailable after the above operation for pod.
MaxUnavailable and MinAvailable are mutually exclusive, MaxUnavailable
is priority to take effect
description: |-
Delete pod, evict pod or update pod specification is allowed if at most "maxUnavailable" pods selected by
"selector" or "targetRef" are unavailable after the above operation for pod.
MaxUnavailable and MinAvailable are mutually exclusive, MaxUnavailable is priority to take effect
x-kubernetes-int-or-string: true
minAvailable:
anyOf:
- type: integer
- type: string
description: Delete pod, evict pod or update pod specification is
allowed if at least "minAvailable" pods selected by "selector" or
"targetRef" will still be available after the above operation for
pod.
description: |-
Delete pod, evict pod or update pod specification is allowed if at least "minAvailable" pods selected by
"selector" or "targetRef" will still be available after the above operation for pod.
x-kubernetes-int-or-string: true
selector:
description: Selector label query over pods managed by the budget
@ -83,47 +84,49 @@ spec:
description: matchExpressions is a list of label selector requirements.
The requirements are ANDed.
items:
description: A label selector requirement is a selector that
contains values, a key, and an operator that relates the key
and values.
description: |-
A label selector requirement is a selector that contains values, a key, and an operator that
relates the key and values.
properties:
key:
description: key is the label key that the selector applies
to.
type: string
operator:
description: operator represents a key's relationship to
a set of values. Valid operators are In, NotIn, Exists
and DoesNotExist.
description: |-
operator represents a key's relationship to a set of values.
Valid operators are In, NotIn, Exists and DoesNotExist.
type: string
values:
description: values is an array of string values. If the
operator is In or NotIn, the values array must be non-empty.
If the operator is Exists or DoesNotExist, the values
array must be empty. This array is replaced during a strategic
description: |-
values is an array of string values. If the operator is In or NotIn,
the values array must be non-empty. If the operator is Exists or DoesNotExist,
the values array must be empty. This array is replaced during a strategic
merge patch.
items:
type: string
type: array
x-kubernetes-list-type: atomic
required:
- key
- operator
type: object
type: array
x-kubernetes-list-type: atomic
matchLabels:
additionalProperties:
type: string
description: matchLabels is a map of {key,value} pairs. A single
{key,value} in the matchLabels map is equivalent to an element
of matchExpressions, whose key field is "key", the operator
is "In", and the values array contains only "value". The requirements
are ANDed.
description: |-
matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
map is equivalent to an element of matchExpressions, whose key field is "key", the
operator is "In", and the values array contains only "value". The requirements are ANDed.
type: object
type: object
x-kubernetes-map-type: atomic
targetRef:
description: TargetReference contains enough information to let you
identify an workload for PodUnavailableBudget Selector and TargetReference
are mutually exclusive, TargetReference is priority to take effect
description: |-
TargetReference contains enough information to let you identify an workload for PodUnavailableBudget
Selector and TargetReference are mutually exclusive, TargetReference is priority to take effect
properties:
apiVersion:
description: API version of the referent.
@ -153,14 +156,14 @@ spec:
additionalProperties:
format: date-time
type: string
description: DisruptedPods contains information about pods whose eviction
or deletion was processed by the API handler but has not yet been
observed by the PodUnavailableBudget.
description: |-
DisruptedPods contains information about pods whose eviction or deletion was
processed by the API handler but has not yet been observed by the PodUnavailableBudget.
type: object
observedGeneration:
description: Most recent generation observed when updating this PUB
status. UnavailableAllowed and other status information is valid
only if observedGeneration equals to PUB's object generation.
description: |-
Most recent generation observed when updating this PUB status. UnavailableAllowed and other
status information is valid only if observedGeneration equals to PUB's object generation.
format: int64
type: integer
totalReplicas:
@ -177,9 +180,9 @@ spec:
additionalProperties:
format: date-time
type: string
description: UnavailablePods contains information about pods whose
specification changed(inplace-update pod), once pod is available(consistent
and ready) again, it will be removed from the list.
description: |-
UnavailablePods contains information about pods whose specification changed(inplace-update pod),
once pod is available(consistent and ready) again, it will be removed from the list.
type: object
required:
- currentAvailable
@ -192,9 +195,3 @@ spec:
storage: true
subresources:
status: {}
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []

View File

@ -19,6 +19,7 @@ resources:
- bases/apps.kruise.io_persistentpodstates.yaml
- bases/apps.kruise.io_podprobemarkers.yaml
- bases/apps.kruise.io_nodepodprobes.yaml
- bases/apps.kruise.io_imagelistpulljobs.yaml
# +kubebuilder:scaffold:crdkustomizeresource
patchesStrategicMerge:

View File

@ -0,0 +1,3 @@
resources:
- namespace.yaml
- rbac.yaml

View File

@ -0,0 +1,4 @@
apiVersion: v1
kind: Namespace
metadata:
name: kruise-daemon-config

View File

@ -0,0 +1,29 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
creationTimestamp: null
name: kruise-daemon-secret-role
namespace: kruise-daemon-config
rules:
- apiGroups:
- ""
resources:
- secrets
verbs:
- get
- list
- watch
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: kruise-daemon-secret-rolebinding
namespace: kruise-daemon-config
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: kruise-daemon-secret-role
subjects:
- kind: ServiceAccount
name: kruise-daemon
namespace: kruise-system

View File

@ -0,0 +1,8 @@
namespace: kruise-daemon-config
# Value of this field is prepended to the
# names of all resources, e.g. a deployment named
# "wordpress" becomes "alices-wordpress".
# Note that it should also match with the prefix (text before '-') of the namespace
# field above.
bases:
- config

View File

@ -0,0 +1,6 @@
apiVersion: v1
kind: Namespace
metadata:
labels:
control-plane: controller-manager
name: kruise-daemon-config

View File

@ -1,6 +1,3 @@
# Adds namespace to all resources.
namespace: kruise-system
# Value of this field is prepended to the
# names of all resources, e.g. a deployment named
# "wordpress" becomes "alices-wordpress".
@ -12,16 +9,19 @@ namePrefix: kruise-
#commonLabels:
# someName: someValue
resources:
- kruise-daemon-config.yaml
bases:
- ../crd
- ../rbac
- ../manager
# [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix including the one in
# [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix including the one in
# crd/kustomization.yaml
- ../webhook
# [CERTMANAGER] To enable cert-manager, uncomment all sections with 'CERTMANAGER'. 'WEBHOOK' components are required.
#- ../certmanager
# [PROMETHEUS] To enable prometheus monitor, uncomment all sections with 'PROMETHEUS'.
# [PROMETHEUS] To enable prometheus monitor, uncomment all sections with 'PROMETHEUS'.
#- ../prometheus
patchesStrategicMerge:
@ -30,7 +30,7 @@ patchesStrategicMerge:
# endpoint w/o any authn/z, please comment the following line.
# - manager_auth_proxy_patch.yaml
# [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix including the one in
# [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix including the one in
# crd/kustomization.yaml
- manager_webhook_patch.yaml

View File

@ -1,2 +1,5 @@
# Adds namespace to all resources.
namespace: kruise-system
resources:
- manager.yaml

View File

@ -35,9 +35,17 @@ spec:
- --enable-leader-election
- --logtostderr=true
- --v=5
- --feature-gates=AllAlpha=true
- --feature-gates=AllAlpha=true,AllBeta=true,EnableExternalCerts=false
image: controller:latest
imagePullPolicy: Always
securityContext:
capabilities:
drop:
- all
add: [ 'NET_BIND_SERVICE' ]
allowPrivilegeEscalation: false
runAsNonRoot: true
runAsUser: 65534
name: manager
env:
- name: KUBE_CACHE_MUTATION_DETECTOR
@ -52,8 +60,8 @@ spec:
port: 8000
resources:
limits:
cpu: 100m
memory: 200Mi
cpu: 2
memory: 2Gi
requests:
cpu: 100m
memory: 200Mi
@ -94,9 +102,16 @@ spec:
args:
- --logtostderr=true
- -v=5
- --feature-gates=AllAlpha=true
- --feature-gates=AllAlpha=true,AllBeta=true
- --max-workers-for-pull-image=2
image: controller:latest
imagePullPolicy: Always
securityContext:
capabilities:
drop:
- all
add: [ 'NET_BIND_SERVICE' ]
allowPrivilegeEscalation: false
name: daemon
env:
- name: KUBE_CACHE_MUTATION_DETECTOR

View File

@ -53,8 +53,6 @@ rules:
verbs:
- get
- list
- patch
- update
- watch
- apiGroups:
- ""
@ -64,14 +62,6 @@ rules:
- get
- patch
- update
- apiGroups:
- ""
resources:
- secrets
verbs:
- get
- list
- watch
- apiGroups:
- apps.kruise.io
resources:

View File

@ -1,3 +1,6 @@
# Adds namespace to all resources.
namespace: kruise-system
resources:
- role.yaml
- role_binding.yaml

View File

@ -1,30 +1,43 @@
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
creationTimestamp: null
name: manager-role
rules:
- apiGroups:
- ""
resources:
- configmaps
- events
- persistentvolumeclaims
- pods
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- ""
resources:
- namespaces
- nodes
verbs:
- get
- list
- watch
- apiGroups:
- ""
resources:
- pods/ephemeralcontainers
- pods/status
- pods/resize
verbs:
- get
- patch
- update
- apiGroups:
- ""
resources:
@ -54,15 +67,6 @@ rules:
- admissionregistration.k8s.io
resources:
- mutatingwebhookconfigurations
verbs:
- get
- list
- patch
- update
- watch
- apiGroups:
- admissionregistration.k8s.io
resources:
- validatingwebhookconfigurations
verbs:
- get
@ -84,18 +88,8 @@ rules:
- apps
resources:
- controllerrevisions
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- apps
resources:
- deployments
- statefulsets
verbs:
- create
- delete
@ -108,6 +102,7 @@ rules:
- apps
resources:
- deployments/status
- statefulsets/status
verbs:
- get
- patch
@ -126,30 +121,23 @@ rules:
- replicasets/status
verbs:
- get
- apiGroups:
- apps
resources:
- statefulsets
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- apps
resources:
- statefulsets/status
verbs:
- get
- patch
- update
- apiGroups:
- apps.kruise.io
resources:
- advancedcronjobs
- broadcastjobs
- clonesets
- containerrecreaterequests
- daemonsets
- imagelistpulljobs
- imagepulljobs
- nodeimages
- nodepodprobes
- persistentpodstates
- podprobemarkers
- sidecarsets
- statefulsets
- uniteddeployments
verbs:
- create
- delete
@ -158,90 +146,48 @@ rules:
- patch
- update
- watch
- apiGroups:
- apps.kruise.io
resources:
- advancedcronjobs/finalizers
- broadcastjobs/finalizers
- clonesets/finalizers
- containerrecreaterequests/finalizers
- daemonsets/finalizers
- imagelistpulljobs/finalizers
- imagepulljobs/finalizers
- nodeimages/finalizers
- nodepodprobes/finalizers
- persistentpodstates/finalizers
- podprobemarkers/finalizers
- resourcedistributions/finalizers
- sidecarsets/finalizers
- statefulsets/finalizers
- uniteddeployments/finalizers
- workloadspreads/finalizers
verbs:
- update
- apiGroups:
- apps.kruise.io
resources:
- advancedcronjobs/status
verbs:
- get
- patch
- update
- apiGroups:
- apps.kruise.io
resources:
- broadcastjobs
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- apps.kruise.io
resources:
- broadcastjobs/status
verbs:
- get
- patch
- update
- apiGroups:
- apps.kruise.io
resources:
- clonesets
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- apps.kruise.io
resources:
- clonesets/status
verbs:
- get
- patch
- update
- apiGroups:
- apps.kruise.io
resources:
- containerrecreaterequests
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- apps.kruise.io
resources:
- containerrecreaterequests/status
verbs:
- get
- patch
- update
- apiGroups:
- apps.kruise.io
resources:
- daemonsets
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- apps.kruise.io
resources:
- daemonsets/status
- ephemeraljobs/finalizers
- ephemeraljobs/status
- imagelistpulljobs/status
- imagepulljobs/status
- nodeimages/status
- nodepodprobes/status
- persistentpodstates/status
- podprobemarkers/status
- resourcedistributions/status
- sidecarsets/status
- statefulsets/status
- uniteddeployments/status
- workloadspreads/status
verbs:
- get
- patch
@ -257,114 +203,6 @@ rules:
- patch
- update
- watch
- apiGroups:
- apps.kruise.io
resources:
- ephemeraljobs/status
verbs:
- get
- patch
- update
- apiGroups:
- apps.kruise.io
resources:
- imagepulljobs
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- apps.kruise.io
resources:
- imagepulljobs/status
verbs:
- get
- patch
- update
- apiGroups:
- apps.kruise.io
resources:
- nodeimages
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- apps.kruise.io
resources:
- nodeimages/status
verbs:
- get
- patch
- update
- apiGroups:
- apps.kruise.io
resources:
- nodepodprobes
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- apps.kruise.io
resources:
- nodepodprobes/status
verbs:
- get
- patch
- update
- apiGroups:
- apps.kruise.io
resources:
- persistentpodstates
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- apps.kruise.io
resources:
- persistentpodstates/status
verbs:
- get
- patch
- update
- apiGroups:
- apps.kruise.io
resources:
- podprobemarkers
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- apps.kruise.io
resources:
- podprobemarkers/status
verbs:
- get
- patch
- update
- apiGroups:
- apps.kruise.io
resources:
@ -373,74 +211,6 @@ rules:
- get
- list
- watch
- apiGroups:
- apps.kruise.io
resources:
- resourcedistributions/status
verbs:
- get
- patch
- update
- apiGroups:
- apps.kruise.io
resources:
- sidecarsets
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- apps.kruise.io
resources:
- sidecarsets/status
verbs:
- get
- patch
- update
- apiGroups:
- apps.kruise.io
resources:
- statefulsets
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- apps.kruise.io
resources:
- statefulsets/status
verbs:
- get
- patch
- update
- apiGroups:
- apps.kruise.io
resources:
- uniteddeployments
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- apps.kruise.io
resources:
- uniteddeployments/status
verbs:
- get
- patch
- update
- apiGroups:
- apps.kruise.io
resources:
@ -451,14 +221,6 @@ rules:
- patch
- update
- watch
- apiGroups:
- apps.kruise.io
resources:
- workloadspreads/status
verbs:
- get
- patch
- update
- apiGroups:
- batch
resources:
@ -479,90 +241,6 @@ rules:
- get
- patch
- update
- apiGroups:
- ""
resources:
- configmaps
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- ""
resources:
- events
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- ""
resources:
- nodes
verbs:
- get
- list
- watch
- apiGroups:
- ""
resources:
- persistentvolumeclaims
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- ""
resources:
- pods
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- ""
resources:
- pods/ephemeralcontainers
verbs:
- get
- patch
- update
- apiGroups:
- ""
resources:
- pods/status
verbs:
- get
- patch
- update
- apiGroups:
- ""
resources:
- secrets
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- policy.kruise.io
resources:
@ -575,6 +253,12 @@ rules:
- patch
- update
- watch
- apiGroups:
- policy.kruise.io
resources:
- podunavailablebudgets/finalizers
verbs:
- update
- apiGroups:
- policy.kruise.io
resources:
@ -583,3 +267,11 @@ rules:
- get
- patch
- update
- apiGroups:
- storage.k8s.io
resources:
- storageclasses
verbs:
- get
- list
- watch

View File

@ -1,3 +1,6 @@
# Adds namespace to all resources.
namespace: kruise-system
resources:
- manifests.yaml
- service.yaml

View File

@ -1,9 +1,7 @@
---
apiVersion: admissionregistration.k8s.io/v1
kind: MutatingWebhookConfiguration
metadata:
creationTimestamp: null
name: mutating-webhook-configuration
webhooks:
- admissionReviewVersions:
@ -131,6 +129,27 @@ webhooks:
resources:
- daemonsets
sideEffects: None
- admissionReviewVersions:
- v1
- v1beta1
clientConfig:
service:
name: webhook-service
namespace: system
path: /mutate-apps-kruise-io-v1alpha1-imagelistpulljob
failurePolicy: Fail
name: mimagelistpulljob.kb.io
rules:
- apiGroups:
- apps.kruise.io
apiVersions:
- v1alpha1
operations:
- CREATE
- UPDATE
resources:
- imagelistpulljobs
sideEffects: None
- admissionReviewVersions:
- v1
- v1beta1
@ -237,12 +256,10 @@ webhooks:
resources:
- uniteddeployments
sideEffects: None
---
apiVersion: admissionregistration.k8s.io/v1
kind: ValidatingWebhookConfiguration
metadata:
creationTimestamp: null
name: validating-webhook-configuration
webhooks:
- admissionReviewVersions:
@ -453,6 +470,48 @@ webhooks:
resources:
- daemonsets
sideEffects: None
- admissionReviewVersions:
- v1
- v1beta1
clientConfig:
service:
name: webhook-service
namespace: system
path: /validate-apps-kruise-io-v1alpha1-ephemeraljob
failurePolicy: Fail
name: vephemeraljobs.kb.io
rules:
- apiGroups:
- apps.kruise.io
apiVersions:
- v1alpha1
operations:
- CREATE
- UPDATE
resources:
- ephemeraljobs
sideEffects: None
- admissionReviewVersions:
- v1
- v1beta1
clientConfig:
service:
name: webhook-service
namespace: system
path: /validate-apps-kruise-io-v1alpha1-imagelistpulljob
failurePolicy: Fail
name: vimagelistpulljob.kb.io
rules:
- apiGroups:
- apps.kruise.io
apiVersions:
- v1alpha1
operations:
- CREATE
- UPDATE
resources:
- imagelistpulljobs
sideEffects: None
- admissionReviewVersions:
- v1
- v1beta1
@ -474,6 +533,27 @@ webhooks:
resources:
- imagepulljobs
sideEffects: None
- admissionReviewVersions:
- v1
- v1beta1
clientConfig:
service:
name: webhook-service
namespace: system
path: /validate-ingress
failurePolicy: Fail
name: vingress.kb.io
rules:
- apiGroups:
- networking.k8s.io
apiVersions:
- v1
- v1beta1
operations:
- DELETE
resources:
- ingresses
sideEffects: None
- admissionReviewVersions:
- v1
- v1beta1
@ -619,6 +699,26 @@ webhooks:
resources:
- podunavailablebudgets
sideEffects: None
- admissionReviewVersions:
- v1
- v1beta1
clientConfig:
service:
name: webhook-service
namespace: system
path: /validate-service
failurePolicy: Fail
name: vservice.kb.io
rules:
- apiGroups:
- ""
apiVersions:
- v1
operations:
- DELETE
resources:
- services
sideEffects: None
- admissionReviewVersions:
- v1
- v1beta1

View File

@ -39,6 +39,16 @@ webhooks:
matchExpressions:
- key: policy.kruise.io/delete-protection
operator: Exists
- name: vservice.kb.io
objectSelector:
matchExpressions:
- key: policy.kruise.io/delete-protection
operator: Exists
- name: vingress.kb.io
objectSelector:
matchExpressions:
- key: policy.kruise.io/delete-protection
operator: Exists
- name: vpod.kb.io
namespaceSelector:
matchExpressions:

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
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,
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.
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.

Binary file not shown.

After

Width:  |  Height:  |  Size: 188 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 170 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 99 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 180 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 356 KiB

View File

@ -36,7 +36,7 @@ One of the most common-used features of it is to pull images from private reposi
## Proposal
**Main idea**: In this design, we separate the logic of `Secret` and `SidecarSet`.
In `SidecarSet` part, we only consider injecting their `imagePullSecrets` feilds into Pod.
In `SidecarSet` part, we only consider injecting their `imagePullSecrets` fields into Pod.
Users should manually distribute the required `Secrets` to all the namespaces that the `SidecarSet` may be instantiated.
### API Definition

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