Compare commits

...

92 Commits

Author SHA1 Message Date
ChrisLiu d0cfc2e2d7
kruise-game v1.0.0 release (#152)
Signed-off-by: ChrisLiu <chrisliu1995@163.com>
2025-07-21 20:39:52 +08:00
ChrisLiu 1259df091a
kruise-game v1.0.0-rc release (#151)
Signed-off-by: ChrisLiu <chrisliu1995@163.com>
2025-07-10 19:39:42 +08:00
Ai Ranthem 2b75a2f7db
Release: rollout v0.5.2 and v0.4.3 (#144)
Signed-off-by: AiRanthem <zhongtianyun.zty@alibaba-inc.com>
2025-06-06 11:30:59 +08:00
Zhen Zhang 8cbbdac027
add next version for preparing next major release (#142)
* make kruise deployment spread across availability zone

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

* add next version for preparing next major version

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

---------

Signed-off-by: 守辰 <shouchen.zz@alibaba-inc.com>
2025-05-23 14:52:57 +08:00
Ai Ranthem 8b4803f8cc
Chore: reformat rollout chart (#140)
* reformat rollout webhookconfiguration.yaml

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

* reformat rollout webhookconfiguration.yaml

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

---------

Signed-off-by: AiRanthem <zhongtianyun.zty@alibaba-inc.com>
2025-05-12 14:48:47 +08:00
Ai Ranthem 8c097e79ea
Release: rollout v0.6.1 (#139)
Signed-off-by: AiRanthem <zhongtianyun.zty@alibaba-inc.com>
2025-05-09 16:23:44 +08:00
Abner 1f4d8405c6
bump ci ubuntu version to 24.04 (#138)
Signed-off-by: Abner-1 <yuanyuxing.yyx@alibaba-inc.com>
2025-04-28 09:50:34 +08:00
handagou 9deb623ef1
Fix namespace for kruise rollout webhook service (#136)
Signed-off-by: handagou <z760087139@gmail.com>
2025-04-16 14:08:23 +08:00
j4ckstraw 8dca36c77a
Add aggregate role (#133)
* feat: add aggregate-to-xx roles

non cluster-admin user can't create/update/delete cloneset/statefulset
object,
according to [kubernetes aggregated
clusterrole](https://kubernetes.io/docs/reference/access-authn-authz/rbac/#aggregated-clusterroles),
add clusterroles.

Signed-off-by: j4ckstraw <j4ckstraw@foxmail.com>
2025-03-05 17:30:25 +08:00
Abner 79e725cb0e
add charts for 1.8 (#131)
* add charts for 1.8
* add base install action check


Signed-off-by: Abner-1 <yuanyuxing.yyx@alibaba-inc.com>
2025-02-24 11:06:24 +08:00
Ai Ranthem 1806e0a55c
Release/0.6.0 (#130)
* copy 0.6.0 directory from 0.5.0

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

* update CRDs and versions to 0.6.0

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

* resort rbac_role.yaml to make it consistent with kustomize generated file, making it easier to update

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

* update rbac

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

---------

Signed-off-by: AiRanthem <zhongtianyun.zty@alibaba-inc.com>
2025-02-05 18:04:36 +08:00
skkkkkkk 083a43ccf6
kruise game 0.10.0 (#129)
Signed-off-by: 宋康 <sk01199367@alibaba-inc.com>
Co-authored-by: 宋康 <sk01199367@alibaba-inc.com>
2025-01-10 11:54:59 +08:00
Ai Ranthem 4d538cf371
add pre delete hook (#125)
Signed-off-by: AiRanthem <zhongtianyun.zty@alibaba-inc.com>
2024-12-13 10:44:17 +08:00
Zhen Zhang e111262f53
make kruise deployment spread across availability zone (#124)
Signed-off-by: 守辰 <shouchen.zz@alibaba-inc.com>
2024-11-04 15:15:14 +08:00
Abner 6b875eefa1
build kruise 1.7.2 charts (#119)
Signed-off-by: Abner-1 <yuanyuxing.yyx@alibaba-inc.com>
2024-10-10 20:55:09 +08:00
Abner 3103338756
build kruise 1.6.4 charts (#118) 2024-10-10 20:48:43 +08:00
Abner 32acdf43d6
kruise 1.5.5 (#117)
Signed-off-by: Abner-1 <yuanyuxing.yyx@alibaba-inc.com>
2024-10-10 20:29:09 +08:00
berg c4879675db
kruise 1.7.1 (#116) 2024-09-10 15:28:16 +08:00
berg e9c56f1925
modify kruise 1.7.0 (#115)
Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>
2024-08-28 10:55:39 +08:00
berg b96d3417bd
kruise 1.7.0 (#112)
Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>
2024-08-28 10:40:49 +08:00
skkkkkkk 6af33c3cbc
kruise game 0.9.0 (#113)
Signed-off-by: 宋康 <sk01199367@alibaba-inc.com>
Co-authored-by: 宋康 <sk01199367@alibaba-inc.com>
2024-08-20 18:18:44 +08:00
Kuromesi 5e41bbdcdf
add support for external certs (#108)
Signed-off-by: Kuromesi <blackfacepan@163.com>
2024-08-06 11:54:32 +08:00
Chen Shiwei eab1d11a45
feat: 1.7.0-alpha.1 Kruise-daemon add node nodeAffinity for skip virtual-kubelet node, add Changelog for Chart.yaml (#110)
Signed-off-by: chenshiwei <chenshiwei@ushareit.me>
Co-authored-by: chenshiwei <chenshiwei@ushareit.me>
2024-07-31 17:05:27 +08:00
Ai Ranthem 7afba0dc8f
change kruise daemon dns policy to ClusterFirstWithHostNet (#109)
Signed-off-by: AiRanthem <zhongtianyun.zty@alibaba-inc.com>
Co-authored-by: AiRanthem <zhongtianyun.zty@alibaba-inc.com>
2024-07-30 16:35:26 +08:00
berg c0a6585e27
kruise 1.7.0-alpha.1 (#106)
Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>
2024-06-18 15:24:47 +08:00
berg bc4068ea76
kruise 1.7.0-alphal.1 (#105)
Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>
2024-06-18 14:12:47 +08:00
lizhipeng629 5011dcc52c
Add kruise game 0.8 (#103)
* copy from kruise-game v0.7.0 and add v0.8.0

* modify kruise-game v0.8.0

---------

Co-authored-by: 李志朋 <lizhipeng.629@bytedance.com>
2024-04-28 21:33:01 +08:00
Abner 73f28b5ceb
kruise 1.6.3 (#104)
Signed-off-by: Abner-1 <Abner199709@gmail.com>
2024-04-28 16:15:01 +08:00
berg c1f90ee621
krusie 1.6.2 (#100) 2024-04-03 16:49:40 +08:00
berg bb715d90d9
kruise 1.5.4 (#99)
Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>
2024-04-03 14:03:39 +08:00
berg d1e50a23e7
kruise 1.4.2 (#98)
Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>
2024-04-03 11:24:39 +08:00
berg ed494c6e1b
kruise 1.6.1 (#97)
Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>
2024-03-22 10:26:26 +08:00
berg 0a616991a8
kruise 1.5.3 (#96)
Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>
2024-03-21 17:50:27 +08:00
berg 762a133235
kruise 1.6.0 (#95)
Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>
2024-03-18 19:09:23 +08:00
berg 089189d58a
kruise-rollout 0.4.1, fix the bug that MutatingWebhookConfiguration is not updated when upgrading charts. (#93) 2024-02-29 13:51:06 +08:00
Jeremy 52e41dc9c7
feat: Exclude kube-system by default in webhooks during installation (#92)
* feat: exclude specified namespaces from webhooks

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

* change log

---------

Signed-off-by: hantmac <hantmac@outlook.com>
2024-02-28 10:16:05 +08:00
berg d1c325e49c
kruise 1.4.1 (#89)
Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>
2024-01-26 14:10:37 +08:00
berg 2b15628bdc
kruise 1.3.1 (#88)
Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>
2024-01-26 13:59:35 +08:00
Zhen Zhang 28808a4297
add kube-state-metric 0.2 chart (#87)
* add kube-state-metric 0.2 chart

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

* add kube-state-metric 0.2 chart

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

---------

Signed-off-by: 守辰 <shouchen.zz@alibaba-inc.com>
2024-01-26 13:55:35 +08:00
berg daed104b11
kruise 1.4.1 (#86)
Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>
2024-01-26 12:20:35 +08:00
berg cf0f57434a
krusie 1.5.2 (#85)
Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>
2024-01-26 11:30:35 +08:00
skkkkkkk c3c902f681
add kruise-game 0.7.0 (#83)
Signed-off-by: skkkkkkk <sk01199367@alibaba-inc.com>
Co-authored-by: skkkkkkk <sk01199367@alibaba-inc.com>
2023-12-29 19:12:09 +08:00
berg 69359be9ac
kruise rollout v0.5.0 (#81)
Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>
2023-12-21 16:11:02 +08:00
Wei-Xiang Sun 1ef814f0cc
replace deprecated minio repo for ci (#80)
Signed-off-by: mingzhou.swx <mingzhou.swx@alibaba-inc.com>
Co-authored-by: mingzhou.swx <mingzhou.swx@alibaba-inc.com>
2023-12-18 15:52:59 +08:00
Wei-Xiang Sun 9e232d6bc2
add 1.5.1 kruise charts (#79)
Signed-off-by: mingzhou.swx <mingzhou.swx@alibaba-inc.com>
Co-authored-by: mingzhou.swx <mingzhou.swx@alibaba-inc.com>
2023-12-18 09:59:59 +08:00
berg 6b8372c022
openkruise charts v1.5.1 (#75)
Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>
2023-11-09 10:39:59 +08:00
skkkkkkk 8424d7b532
fix scaler service (#73)
Signed-off-by: skkkkkkk <sk01199367@alibaba-inc.com>
Co-authored-by: skkkkkkk <sk01199367@alibaba-inc.com>
2023-11-07 14:49:58 +08:00
Rimond 030f5de05e
kruise rollout support tolerations (#71)
Co-authored-by: 明源 <liming.jlm@alibaba-inc.com>
2023-10-27 10:39:48 +08:00
ChrisLiu 5066fd01f0
kruise-game v0.6.0 (#72)
Signed-off-by: ChrisLiu <chrisliu1995@163.com>
2023-10-27 10:38:48 +08:00
berg 21f8a3b8e2
reload kruise v1.5.0 chart (#69)
Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>
2023-09-19 11:23:14 +08:00
berg 72880546a8
reload kruise v1.5.0 charts (#68)
Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>
2023-09-18 19:45:13 +08:00
berg a8b368fa8a
modify kruise v1.5.0 cloneset yaml (#67)
Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>
2023-09-18 17:58:13 +08:00
Wei-Xiang Sun 96f1c026e6
remove unwelcome softlink (#66)
Signed-off-by: mingzhou.swx <mingzhou.swx@alibaba-inc.com>
Co-authored-by: mingzhou.swx <mingzhou.swx@alibaba-inc.com>
2023-09-18 17:08:14 +08:00
Wei-Xiang Sun 573aaa450d
Kruise release 1.5 charts (#65)
* 1.5 init

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

* add kruise 1.5.0 charts

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

* add kruise 1.5.0 charts

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-09-11 17:24:07 +08:00
ChrisLiu f7a09ec6f7
kruise-game v0.5.0 (#62)
Signed-off-by: ChrisLiu <chrisliu1995@163.com>
2023-08-11 10:40:38 +08:00
ChrisLiu 03f3670e6f
add chrisliu1995 as owner (#63)
Signed-off-by: ChrisLiu <chrisliu1995@163.com>
2023-08-11 10:38:39 +08:00
berg b04e2a6d71
kruise rollout v0.4.0 (#60)
Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>
2023-07-13 17:44:13 +08:00
skkkkkkk 657a896b4b
fix kruise-game 0.4.1 (#59)
Signed-off-by: “skkkkkkk” <sk01199367@alibaba-inc.com>
Co-authored-by: “skkkkkkk” <sk01199367@alibaba-inc.com>
2023-07-13 13:51:13 +08:00
skkkkkkk f93fce17e5
fix chart value (#58)
Co-authored-by: “skkkkkkk” <sk01199367@alibaba-inc.com>
2023-07-13 12:32:13 +08:00
skkkkkkk 27a0f0e0a2
remove dependency (#57)
Signed-off-by: “skkkkkkk” <sk01199367@alibaba-inc.com>
Co-authored-by: “skkkkkkk” <sk01199367@alibaba-inc.com>
2023-07-12 17:44:14 +08:00
ChrisLiu 22e34d104c
kruise-game v0.4.0 (#56)
Signed-off-by: ChrisLiu <chrisliu1995@163.com>
2023-07-10 10:02:10 +08:00
skkkkkkk ec3332446d
kruise game 0.3.0 (#53)
Signed-off-by: “skkkkkkk” <sk01199367@alibaba-inc.com>
Co-authored-by: “skkkkkkk” <sk01199367@alibaba-inc.com>
2023-05-26 10:35:29 +08:00
skkkkkkk 05a8041151
kruise-game v0.2.1 (#52)
* kruise-game v0.2.1

* add README.MD

---------

Co-authored-by: “skkkkkkk” <sk01199367@alibaba-inc.com>
2023-04-03 10:14:42 +08:00
berg 9e0266d8b2
kruise 1.4.0 charts (#51)
Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>
2023-03-27 10:05:37 +08:00
berg 0e5e5bac67
kruise state metrics add ServiceMonitor configuration (#44)
Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>
2023-02-15 15:59:00 +08:00
berg bafb56ca97
Modify publish.yaml (#48)
* add env GITHUB_TOKEN in publish.yaml

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

* add github workload write permission

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

---------

Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>
2023-02-15 10:37:00 +08:00
berg 05bbc56455
add env GITHUB_TOKEN in publish.yaml (#47)
Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>
2023-02-15 09:41:00 +08:00
Wei-Xiang Sun f08cc4f30f
Add kruise rollout v0.3.0 chart (#45)
* kruise rollout v0.3.0

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

* add kruise rollout readme

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-02-13 16:22:59 +08:00
StevenLeiZhang b59801a0b0
Fix: fail to install Kruise rollout in customized namespace (#37)
Signed-off-by: StevenLeiZhang <zhangleiic@163.com>
2023-02-10 14:00:55 +08:00
berg 17a0ddbae5
add github_token id-token=write permission (#40)
Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>
2023-01-31 17:50:47 +08:00
berg f5439cab4a
kruise state metrics chart (#39)
Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>
2023-01-31 16:37:47 +08:00
Rimond 201a65e191
add kurise-rollout imagepullsecrets support (#38)
* add kurise-rollout imagepullsecrets support

* rename kruise-rollout chart version

Co-authored-by: liming.jlm <liming.jlm@alibaba-inc.com>
2023-01-03 18:22:21 +08:00
berg 1ca7afe6b4
add zmberg to owners (#35)
Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>

Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>
2022-12-20 17:15:09 +08:00
berg e9e3a2b0d6
kruise rollout v0.3.0-rc.0 (#34)
Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>

Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>
2022-12-20 16:20:08 +08:00
Marco Geri 284394fd99
support extra env in manager DaemonSet (#25)
Now is possible to add extra environment variables in the manager DaemonSet.
This allows for example to support corporate proxy when downloading images
with ImagePullJob setting the HTTP_PROXY, HTTPS_PROXY, NO_PROXY env vars.

Signed-off-by: Marco Geri <m.geri1974@gmail.com>

Signed-off-by: Marco Geri <m.geri1974@gmail.com>
2022-12-19 14:00:10 +08:00
skkkkkkk 4cf0011744
kruise-game v0.2.0 (#33)
Co-authored-by: “skkkkkkk” <sk01199367@alibaba-inc.com>
2022-12-13 17:23:02 +08:00
skkkkkkk 682cbeaaf7
add configmap for kruise game (#28)
Co-authored-by: “skkkkkkk” <sk01199367@alibaba-inc.com>
2022-12-09 11:20:58 +08:00
yike21 a44ffe1eb6
fix hardcoded references to namespace in kruise/1.3.0/templates and kruise-rollout/0.2.0/templates (#23)
Signed-off-by: yike21 <yike21@qq.com>

Signed-off-by: yike21 <yike21@qq.com>
2022-12-02 13:49:52 +08:00
berg a0fced74d7
upgrade helm to v3 (#27) 2022-11-29 17:24:50 +08:00
skkkkkkk 5d8159bd25
add chart kruise-game (#26)
Co-authored-by: “skkkkkkk” <sk01199367@alibaba-inc.com>
2022-11-28 10:29:48 +08:00
berg eac28d38bc
krusie rollout deployment webhook ignore itself (#24)
Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>

Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>
2022-11-16 14:00:38 +08:00
berg de55acdf22
kruise charts 1.3.0 (#21)
Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>

Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>
2022-10-09 13:58:07 +08:00
berg 423883ac06
kruise rollout v0.2.0 (#19)
Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>
2022-07-25 11:10:40 +08:00
berg 2237183513
kruise rollout v0.1.1 (#18)
Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>
2022-07-12 14:06:28 +08:00
Siyu Wang 3f1f71c683
Package chart for v1.2.0 (#17)
Signed-off-by: Siyu Wang <FillZpp.pub@gmail.com>
2022-06-06 14:43:05 +08:00
berg c0cfe9d359
helm cr upload --skip-existing (#16)
Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>
2022-04-21 20:45:10 +08:00
berg dd61115856
Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com> (#8)
kruise-rollout v0.1.0
2022-04-21 14:39:12 +08:00
Siyu Wang f46b9f3265
Add chart 1.1.0 (#14)
Signed-off-by: FillZpp <FillZpp.pub@gmail.com>
2022-03-28 17:12:26 +08:00
Elliot Maincourt 1e02966f43
feat(chart): add imagePullSecrets support (#12)
* feat(chart): add imagePullSecrets support

Signed-off-by: Elliot Maincourt <e.maincourt@gmail.com>

* fix(chart): only use a single root imagePullSecrets reference
2022-03-24 10:57:48 +08:00
Jeremy 60d442c3ec
remove useless value (#13)
Signed-off-by: hantmac <hantmac@outlook.com>
2022-03-21 11:41:47 +08:00
FillZpp 96d603fee8 Add OWNERS
Signed-off-by: FillZpp <FillZpp.pub@gmail.com>
2022-03-21 11:39:10 +08:00
FillZpp a083cdd160 Move history versions here
Signed-off-by: FillZpp <FillZpp.pub@gmail.com>
2022-01-27 11:13:56 +08:00
1405 changed files with 332480 additions and 9 deletions

81
.github/workflows/e2e-kruise.yaml vendored Normal file
View File

@ -0,0 +1,81 @@
name: E2E-base
on:
push:
branches:
- master
- release-*
pull_request: { }
workflow_dispatch: { }
# Declare default permissions as read only.
permissions: read-all
env:
# Common versions
GO_VERSION: '1.22'
KIND_VERSION: 'v0.18.0'
KIND_VERSION_FOR_HIGHER: 'v0.22.0'
KIND_CLUSTER_NAME: 'ci-testing'
# todo: add kruise e2e here
jobs:
# 1.27-
install-for-lower:
runs-on: ubuntu-24.04
strategy:
matrix:
kind-version: [ v1.20.15, v1.24.6, v1.26.3 ]
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
submodules: true
- name: Setup Kind Cluster ${{ matrix.kind-version }}
uses: helm/kind-action@a1b0e391336a6ee6713a0583f8c6240d70863de3 # v1.12.0
with:
node_image: kindest/node:${{ matrix.kind-version }}
cluster_name: ${{ env.KIND_CLUSTER_NAME }}
config: ./test/kind-conf.yaml
version: ${{ env.KIND_VERSION }}
- name: Install Kruise
run: |
make install-kruise-from-local
- name: install Kruise state metrics
run: |
make install-kruise-state-metrics-from-local
- name: install Kruise rollout
if: ${{ ! startsWith(matrix.kind-version, 'v1.18') }}
run: |
make install-kruise-rollout-from-local
- name: install Kruise game
run: |
make install-kruise-game-from-local
# 1.27+
install-for-higher:
runs-on: ubuntu-24.04
strategy:
matrix:
kind-version: [ v1.28.7, v1.30.8 ]
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
submodules: true
- name: Setup Kind Cluster ${{ matrix.kind-version }}
uses: helm/kind-action@a1b0e391336a6ee6713a0583f8c6240d70863de3 # v1.12.0
with:
node_image: kindest/node:${{ matrix.kind-version }}
cluster_name: ${{ env.KIND_CLUSTER_NAME }}
config: ./test/kind-conf-with-vpa.yaml
version: ${{ env.KIND_VERSION_FOR_HIGHER }}
- name: Install Kruise
run: |
make install-kruise-from-local
- name: install Kruise state metrics
run: |
make install-kruise-state-metrics-from-local
- name: install Kruise rollout
run: |
make install-kruise-rollout-from-local
- name: install Kruise game
run: |
make install-kruise-game-from-local

View File

@ -17,7 +17,7 @@ jobs:
- name: Set up python
uses: actions/setup-python@v2
with:
python-version: 3.7
python-version: 3.x
- name: Setup Chart Linting
id: lint

View File

@ -5,6 +5,12 @@ on:
branches:
- master
- rewrite-build
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
id-token: write
contents: write
jobs:
publish:
runs-on: ubuntu-latest
@ -15,27 +21,29 @@ jobs:
fetch-depth: 0
- name: Install Helm
uses: azure/setup-helm@v1
uses: azure/setup-helm@v3
- name: Add dependency chart repos
run: |
helm repo add openkruise https://openkruise.github.io/charts
helm repo add minio https://helm.min.io/
helm repo add minio https://operator.min.io
helm repo add stable https://charts.helm.sh/stable
helm repo add incubator https://charts.helm.sh/incubator
- name: Configure Git
run: |
git config user.name "gh-actions"
git config user.email "actions@github.com"
git config user.email "actions@github.com"
# This is required to consider the old Circle-CI Index and to stay compatible with all the old releases.
- name: Fetch current Chart Index
- name: Fetch current Chart Index
run: |
git checkout origin/gh-pages index.yaml
- name: Run chart-releaser
uses: helm/chart-releaser-action@v1.2.1
with:
with:
charts_dir: charts
config: "./.github/configs/cr.yaml"
env:
CR_TOKEN: "${{ secrets.GH_TOKEN }}"
CR_SKIP_EXISTING: "true"
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"

View File

@ -16,6 +16,19 @@ Any breaking changes to a chart (backwards incompatible) require:
* Bump of the current Major version of the chart
* State possible manual changes for this chart version in the `Upgrading` section of the chart's `README.md.gotmpl` ([See Upgrade](#upgrades))
A pseudo version called `next` is used to prepare changes for the next major release, any fix and optimization of the chart can be made in the next version. Before creating the actual new major version, one should copy the content of `next` version and make changes accordingly. As an example, when preparing for the new major release of kruise 1.8.0, the operations is as follows:
```
cd <repo-root>/versions/kruise/
cp -r next 1.8.0
```
Before creating a new minor version, one should copy the latest version of corresponding major version. As an example. when preparing for the next minor release of kruise 1.7.x, and the latest version of 1.7.x is 1.7.3, then the operation is as follows:
```
cd <repo-root>/versions/kruise/
cp -r 1.7.3 1.7.4
```
### Immutability
Each release for each chart must be immutable. Any change to a chart (even just documentation) requires a version bump. Trying to release the same version twice will result in an error.
@ -88,4 +101,11 @@ The linting can be invoked manually with the following command:
## Publishing Changes
Changes are automatically publish whenever a commit is merged to master. The CI job (see `./.github/workflows/publish.yml`).
Before actually publish new releases, one should link the chart directory to the corresponding version directory. As an example, if one is about to release kruise 1.7.4, the operation is as follows:
```
cd <repo-root>/charts
ln -sf ../versions/kruise/1.7.4 kruise
```
Changes are automatically publish whenever a commit is merged to master. The CI job (see `./.github/workflows/publish.yml`).

33
Makefile Normal file
View File

@ -0,0 +1,33 @@
IMG ?= openkruise/kruise-manager:test
.PHONY: install-kruise-from-local
install-kruise-from-local:
helm install kruise charts/kruise
./scripts/check-kruise.sh
.PHONY: install-kruise-from-helm
install-kruise-from-helm:
helm install kruise openkruise/kruise
./scripts/check-kruise.sh
.PHONY: install-kruise-state-metrics-from-local
install-kruise-state-metrics-from-local:
helm install kruise-sm charts/kruise-state-metrics --set installation.installServiceMonitor=false
sleep 1
kubectl -n kruise-system wait --for=condition=Ready pods -l control-plane=kruise-state-metrics --timeout=60s || exit 1
.PHONY: install-kruise-rollout-from-local
install-kruise-rollout-from-local:
helm install kruise-rollout charts/kruise-rollout
sleep 1
kubectl -n kruise-rollout wait --for=condition=Ready pods -l control-plane=kruise-rollout-controller-manager --timeout=60s || exit 1
.PHONY: install-kruise-game-from-local
install-kruise-game-from-local:
helm install kruise-game charts/kruise-game
sleep 1
kubectl -n kruise-game-system wait --for=condition=Ready pods -l control-plane=kruise-game-controller-manager --timeout=60s || exit 1
install-from-local: install-kruise-from-local install-kruise-state-metrics-from-local

11
OWNERS Normal file
View File

@ -0,0 +1,11 @@
# See: https://go.k8s.io/owners
approvers:
- FillZpp
- furykerry
- zmberg
- chrisliu1995
reviewers:
- FillZpp
- furykerry
- zmberg
- chrisliu1995

View File

@ -1 +1 @@
../versions/1.0.1
../versions/kruise/1.8.0

1
charts/kruise-game Symbolic link
View File

@ -0,0 +1 @@
../versions/kruise-game/1.0.0

1
charts/kruise-rollout Symbolic link
View File

@ -0,0 +1 @@
../versions/kruise-rollout/0.6.1

1
charts/kruise-state-metrics Symbolic link
View File

@ -0,0 +1 @@
../versions/kruise-state-metrics/0.2

View File

@ -0,0 +1,21 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*~
# Various IDEs
.project
.idea/
*.tmproj

View File

@ -0,0 +1,17 @@
apiVersion: v1
name: kruise
description: Helm chart for all kruise-manager components
version: 0.1.0
appVersion: 0.1.0
icon: http://openkruise.io/img/kruise_white.png
keywords:
- kubernetes
- kruise
- workload
- statefulset
- sidecar
- job
- deployment
home: https://openkruise.io
sources:
- https://github.com/openkruise/kruise

View File

@ -0,0 +1,93 @@
# Kruise
## Install
```bash
# git clone https://github.com/openkruise/kruise
# cd charts/kruise
# helm install kruise ./
```
you will see follow:
```
[root@k8s-master submitted]# helm install kruise ./
NAME: kruise
LAST DEPLOYED: Fri Aug 23 10:37:52 2019
NAMESPACE: default
STATUS: DEPLOYED
RESOURCES:
==> v1/ClusterRole
NAME AGE
kruise-manager-role 0s
==> v1/ClusterRoleBinding
NAME AGE
kruise-manager-rolebinding 0s
==> v1/Namespace
NAME STATUS AGE
kruise-system Active 0s
==> v1/Pod(related)
NAME READY STATUS RESTARTS AGE
kruise-controller-manager-0 0/1 ContainerCreating 0 0s
==> v1/Secret
NAME TYPE DATA AGE
kruise-webhook-server-secret Opaque 0 0s
==> v1/Service
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
kruise-controller-manager-service ClusterIP 10.98.202.12 <none> 443/TCP 0s
==> v1/StatefulSet
NAME READY AGE
kruise-controller-manager 0/1 0s
==> v1beta1/CustomResourceDefinition
NAME AGE
broadcastjobs.apps.kruise.io 0s
sidecarsets.apps.kruise.io 0s
statefulsets.apps.kruise.io 0s
==> v1beta1/MutatingWebhookConfiguration
NAME AGE
kruise-mutating-webhook-configuration 0s
==> v1beta1/ValidatingWebhookConfiguration
NAME AGE
kruise-validating-webhook-configuration 0s
```
## Uninstall
```bash
# helm delete kruise
```
## Configuration
The following table lists the configurable parameters of the kruise chart and their default values.
| Parameter | Description | Default |
|-------------------------------------------|--------------------------------------------------------------------|-------------------------------------|
| `log.level` | Log level that kruise-manager printed | `4` |
| `revisionHistoryLimit` | Limit of revision history | `3` |
| `manager.resources.limits.cpu` | CPU resource limit of kruise-manager container | |
| `manager.resources.limits.memory` | Memory resource limit of kruise-manager container | |
| `manager.resources.requests.cpu` | CPU resource request of kruise-manager container | |
| `manager.resources.requests.memory` | Memory resource request of kruise-manager container | |
| `manager.metrics.addr` | Addr of metrics served | `localhost` |
| `manager.metrics.port` | Port of metrics served | `8080` |
| `spec.nodeAffinity` | Node affinity policy for kruise-manager pod | `{}` |
| `spec.nodeSelector` | Node labels for kruise-manager pod | `{}` |
| `spec.tolerations` | Tolerations for kruise-manager pod | `[]`
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,
```bash
# helm install kruise ./ --set manager.log.level=5
```

View File

@ -0,0 +1,32 @@
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "kruise.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "kruise.fullname" -}}
{{- if .Values.fullnameOverride -}}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- if contains $name .Release.Name -}}
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "kruise.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}

View File

@ -0,0 +1,186 @@
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
creationTimestamp: null
labels:
controller-tools.k8s.io: "1.0"
name: broadcastjobs.apps.kruise.io
spec:
additionalPrinterColumns:
- JSONPath: .status.desired
description: The desired number of pods. This is typically equal to the number
of nodes satisfied to run pods.
name: Desired
type: integer
- JSONPath: .status.active
description: The number of actively running pods.
name: Active
type: integer
- JSONPath: .status.succeeded
description: The number of pods which reached phase Succeeded.
name: Succeeded
type: integer
- JSONPath: .status.failed
description: The number of pods which reached phase Failed.
name: Failed
type: integer
- 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.
name: AGE
type: date
group: apps.kruise.io
names:
kind: BroadcastJob
plural: broadcastjobs
shortNames:
- bj
scope: Namespaced
subresources:
status: {}
validation:
openAPIV3Schema:
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/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/api-conventions.md#types-kinds'
type: string
metadata:
type: object
spec:
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
backoffLimit:
description: BackoffLimit specifies the number of retries before
marking this job failed. Not setting value means no limit. Only
works for Always type.
format: int32
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
parallelism:
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.
format: int32
type: integer
template:
description: Template describes the pod that will be created when executing
a job.
type: object
required:
- template
- completionPolicy
type: object
status:
properties:
active:
description: The number of actively running pods.
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. It is
represented in RFC3339 form and is in UTC.
format: date-time
type: string
conditions:
description: The latest available observations of an object's current
state. +patchMergeKey=type +patchStrategy=merge
items:
properties:
lastProbeTime:
description: Last time the condition was checked.
format: date-time
type: string
lastTransitionTime:
description: Last time the condition transit from one status to
another.
format: date-time
type: string
message:
description: Human readable message indicating details about last
transition.
type: string
reason:
description: (brief) 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 job condition, Complete or Failed.
type: string
required:
- type
- status
type: object
type: array
desired:
description: The desired number of pods, this is typically equal to
the number of nodes satisfied to run pods.
format: int32
type: integer
failed:
description: The number of pods which reached phase Failed.
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.
format: date-time
type: string
succeeded:
description: The number of pods which reached phase Succeeded.
format: int32
type: integer
required:
- active
- succeeded
- failed
- desired
type: object
version: v1alpha1
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []

View File

@ -0,0 +1,101 @@
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
creationTimestamp: null
labels:
controller-tools.k8s.io: "1.0"
name: sidecarsets.apps.kruise.io
spec:
additionalPrinterColumns:
- JSONPath: .status.matchedPods
description: The number of pods matched.
name: MATCHED
type: integer
- JSONPath: .status.updatedPods
description: The number of pods matched and updated.
name: UPDATED
type: integer
- JSONPath: .status.readyPods
description: The number of pods matched and ready.
name: READY
type: integer
- 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.
name: AGE
type: date
group: apps.kruise.io
names:
kind: SidecarSet
plural: sidecarsets
scope: Cluster
subresources:
status: {}
validation:
openAPIV3Schema:
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/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/api-conventions.md#types-kinds'
type: string
metadata:
type: object
spec:
properties:
containers:
description: Containers is the list of sidecar containers to be injected
into the selected pod
items:
type: object
type: array
paused:
description: Paused indicates that the sidecarset is paused and will
not be processed by the sidecarset controller.
type: boolean
selector:
description: selector is a label query over pods that should be injected
type: object
type: object
status:
properties:
matchedPods:
description: matchedPods is the number of Pods whose labels are matched
with this SidecarSet's selector and are created after sidecarset creates
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.
format: int64
type: integer
readyPods:
description: readyPods is the number of matched Pods that have a ready
condition
format: int32
type: integer
updatedPods:
description: updatedPods is the number of matched Pods that are injected
with the latest SidecarSet's containers
format: int32
type: integer
required:
- matchedPods
- updatedPods
- readyPods
type: object
version: v1alpha1
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []

View File

@ -0,0 +1,221 @@
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
creationTimestamp: null
labels:
controller-tools.k8s.io: "1.0"
name: statefulsets.apps.kruise.io
spec:
additionalPrinterColumns:
- JSONPath: .spec.replicas
description: The desired number of pods.
name: DESIRED
type: integer
- JSONPath: .status.replicas
description: The number of currently all pods.
name: CURRENT
type: integer
- JSONPath: .status.updatedReplicas
description: The number of pods updated.
name: UPDATED
type: integer
- JSONPath: .status.readyReplicas
description: The number of pods ready.
name: READY
type: integer
- 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.
name: AGE
type: date
group: apps.kruise.io
names:
kind: StatefulSet
plural: statefulsets
shortNames:
- sts
scope: Namespaced
subresources:
scale:
labelSelectorPath: .status.labelSelector
specReplicasPath: .spec.replicas
statusReplicasPath: .status.replicas
status: {}
validation:
openAPIV3Schema:
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/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/api-conventions.md#types-kinds'
type: string
metadata:
type: object
spec:
properties:
podManagementPolicy:
description: podManagementPolicy controls how pods are created during
initial scale up, when replacing pods on nodes, or when scaling down.
The default policy is `OrderedReady`, where pods are created in increasing
order (pod-0, then pod-1, etc) and the controller will wait until
each pod is ready before continuing. When scaling down, the pods are
removed in the opposite order. The alternative policy is `Parallel`
which will create pods in parallel to match the desired scale without
waiting, and on scale down will delete all pods at once.
type: string
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, but individual replicas also have a consistent
identity. If unspecified, defaults to 1. TODO: Consider a rename of
this field.'
format: int32
type: integer
revisionHistoryLimit:
description: revisionHistoryLimit is the maximum number of revisions
that will be maintained in the StatefulSet's revision history. The
revision history consists of all revisions not represented by a currently
applied StatefulSetSpec version. The default value is 10.
format: int32
type: integer
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'
type: object
serviceName:
description: 'serviceName is the name of the service that governs this
StatefulSet. This service must exist before the StatefulSet, and is
responsible for the network identity of the set. Pods get DNS/hostnames
that follow the pattern: pod-specific-string.serviceName.default.svc.cluster.local
where "pod-specific-string" is managed by the StatefulSet controller.'
type: string
template:
description: template is the object that describes the pod that will
be created if insufficient replicas are detected. Each pod stamped
out by the StatefulSet will fulfill this Template, but have a unique
identity from the rest of the StatefulSet.
type: object
updateStrategy:
description: updateStrategy indicates the StatefulSetUpdateStrategy
that will be employed to update Pods in the StatefulSet when a revision
is made to Template.
properties:
rollingUpdate:
description: RollingUpdate is used to communicate parameters when
Type is RollingUpdateStatefulSetStrategyType.
properties:
maxUnavailable:
description: 'The maximum number of pods that can be unavailable
during the update. Value can be an absolute number (ex: 5)
or a percentage of desired pods (ex: 10%). Absolute number
is calculated from percentage by rounding down. Also, maxUnavailable
can just be allowed to work with Parallel podManagementPolicy.
Defaults to 1.'
oneOf:
- type: string
- type: integer
partition:
description: Partition indicates the ordinal at which the StatefulSet
should be partitioned. Default value is 0.
format: int32
type: integer
paused:
description: Paused indicates that the StatefulSet is paused.
Default value is false
type: boolean
podUpdatePolicy:
description: PodUpdatePolicy indicates how pods should be updated
Default value is "ReCreate"
type: string
type: object
type:
description: Type indicates the type of the StatefulSetUpdateStrategy.
Default is RollingUpdate.
type: string
type: object
volumeClaimTemplates:
description: 'volumeClaimTemplates is a list of claims that pods are
allowed to reference. The StatefulSet controller is responsible for
mapping network identities to claims in a way that maintains the identity
of a pod. Every claim in this list must have at least one matching
(by name) volumeMount in one container in the template. A claim in
this list takes precedence over any volumes in the template, with
the same name. TODO: Define the behavior if a claim already exists
with the same name.'
items:
type: object
type: array
required:
- selector
- template
type: object
status:
properties:
collisionCount:
description: collisionCount is the count of hash collisions for the
StatefulSet. The StatefulSet controller uses this field as a collision
avoidance mechanism when it needs to create the name for the newest
ControllerRevision.
format: int32
type: integer
conditions:
description: Represents the latest available observations of a statefulset's
current state. +patchMergeKey=type +patchStrategy=merge
items:
type: object
type: array
currentReplicas:
description: currentReplicas is the number of Pods created by the StatefulSet
controller from the StatefulSet version indicated by currentRevision.
format: int32
type: integer
currentRevision:
description: currentRevision, if not empty, indicates the version of
the StatefulSet used to generate Pods in the sequence [0,currentReplicas).
type: string
observedGeneration:
description: observedGeneration is the most recent generation observed
for this StatefulSet. It corresponds to the StatefulSet's generation,
which is updated on mutation by the API Server.
format: int64
type: integer
readyReplicas:
description: readyReplicas is the number of Pods created by the StatefulSet
controller that have a Ready Condition.
format: int32
type: integer
replicas:
description: replicas is the number of Pods created by the StatefulSet
controller.
format: int32
type: integer
updateRevision:
description: updateRevision, if not empty, indicates the version of
the StatefulSet used to generate Pods in the sequence [replicas-updatedReplicas,replicas)
type: string
updatedReplicas:
description: updatedReplicas is the number of Pods created by the StatefulSet
controller from the StatefulSet version indicated by updateRevision.
format: int32
type: integer
required:
- replicas
- readyReplicas
- currentReplicas
- updatedReplicas
type: object
version: v1alpha1
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []

View File

@ -0,0 +1,111 @@
apiVersion: v1
kind: Namespace
metadata:
labels:
control-plane: controller-manager
controller-tools.k8s.io: "1.0"
name: kruise-system
---
apiVersion: v1
kind: Service
metadata:
labels:
control-plane: controller-manager
controller-tools.k8s.io: "1.0"
name: kruise-controller-manager-service
namespace: kruise-system
spec:
ports:
- port: 443
selector:
control-plane: controller-manager
controller-tools.k8s.io: "1.0"
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
labels:
control-plane: controller-manager
controller-tools.k8s.io: "1.0"
name: kruise-controller-manager
namespace: kruise-system
spec:
replicas: 1
serviceName: kruise-controller-manager-service
revisionHistoryLimit: {{ .Values.revisionHistoryLimit }}
selector:
matchLabels:
control-plane: controller-manager
controller-tools.k8s.io: "1.0"
template:
metadata:
annotations:
prometheus.io/scrape: "true"
labels:
control-plane: controller-manager
controller-tools.k8s.io: "1.0"
spec:
containers:
- command:
- /manager
args:
- "--metrics-addr={{ .Values.manager.metrics.addr }}:{{ .Values.manager.metrics.port }}"
- "--logtostderr=true"
- "--v={{ .Values.manager.log.level }}"
env:
- name: POD_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: SECRET_NAME
value: kruise-webhook-server-secret
image: openkruise/kruise-manager:v0.1.0
imagePullPolicy: Always
name: manager
ports:
- containerPort: {{ .Values.manager.metrics.port }}
name: metrics
protocol: TCP
- containerPort: 9876
name: webhook-server
protocol: TCP
readinessProbe:
tcpSocket:
port: 9876
resources:
{{- toYaml .Values.manager.resources | nindent 12 }}
volumeMounts:
- mountPath: /tmp/cert
name: cert
readOnly: true
terminationGracePeriodSeconds: 10
{{- if .Values.spec.nodeAffinity }}
affinity:
{{- end }}
{{- with .Values.spec.nodeAffinity }}
nodeAffinity:
{{ toYaml . | indent 10 }}
{{- end }}
{{- if .Values.spec.nodeSelector }}
nodeSelector:
{{ toYaml .Values.spec.nodeSelector | indent 8 }}
{{- end }}
{{- if .Values.spec.tolerations }}
tolerations:
{{ toYaml .Values.spec.tolerations | indent 8 }}
{{- end }}
volumes:
- name: cert
secret:
defaultMode: 420
secretName: kruise-webhook-server-secret
---
apiVersion: v1
kind: Secret
metadata:
name: kruise-webhook-server-secret
namespace: kruise-system

View File

@ -0,0 +1,199 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
creationTimestamp: null
name: kruise-manager-role
rules:
- apiGroups:
- ""
resources:
- pods
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- ""
resources:
- nodes
verbs:
- get
- list
- watch
- apiGroups:
- ""
resources:
- pods/status
verbs:
- get
- update
- patch
- apiGroups:
- apps.kruise.io
resources:
- broadcastjobs
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- apps.kruise.io
resources:
- broadcastjobs/status
verbs:
- get
- update
- patch
- apiGroups:
- ""
resources:
- configmaps
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- apps.kruise.io
resources:
- sidecarsets
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- apps.kruise.io
resources:
- sidecarsets/status
verbs:
- get
- update
- patch
- apiGroups:
- ""
resources:
- pods
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- ""
resources:
- pods/status
verbs:
- get
- update
- patch
- apiGroups:
- ""
resources:
- events
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- ""
resources:
- persistentvolumeclaims
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- apps
resources:
- controllerrevisions
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- apps.kruise.io
resources:
- statefulsets
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- apps.kruise.io
resources:
- statefulsets/status
verbs:
- get
- update
- patch
- apiGroups:
- admissionregistration.k8s.io
resources:
- mutatingwebhookconfigurations
- validatingwebhookconfigurations
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- ""
resources:
- secrets
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- ""
resources:
- services
verbs:
- get
- list
- watch
- create
- update
- patch
- delete

View File

@ -0,0 +1,13 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
creationTimestamp: null
name: kruise-manager-rolebinding
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: kruise-manager-role
subjects:
- kind: ServiceAccount
name: default
namespace: kruise-system

View File

@ -0,0 +1,76 @@
apiVersion: admissionregistration.k8s.io/v1beta1
kind: MutatingWebhookConfiguration
metadata:
name: kruise-mutating-webhook-configuration
---
apiVersion: admissionregistration.k8s.io/v1beta1
kind: ValidatingWebhookConfiguration
metadata:
name: kruise-validating-webhook-configuration
webhooks:
- clientConfig:
caBundle: fake
service:
name: kruise-webhook-server-service
namespace: kruise-system
path: /validating-create-update-broadcastjob
failurePolicy: Fail
name: validating-create-update-broadcastjob.kruise.io
namespaceSelector:
matchExpressions:
- key: control-plane
operator: DoesNotExist
rules:
- apiGroups:
- apps.kruise.io
apiVersions:
- v1alpha1
operations:
- CREATE
- UPDATE
resources:
- broadcastjobs
- clientConfig:
caBundle: fake
service:
name: kruise-webhook-server-service
namespace: kruise-system
path: /validating-create-update-sidecarset
failurePolicy: Fail
name: validating-create-update-sidecarset.kruise.io
namespaceSelector:
matchExpressions:
- key: control-plane
operator: DoesNotExist
rules:
- apiGroups:
- apps.kruise.io
apiVersions:
- v1alpha1
operations:
- CREATE
- UPDATE
resources:
- sidecarsets
- clientConfig:
caBundle: fake
service:
name: kruise-webhook-server-service
namespace: kruise-system
path: /validating-create-update-statefulset
failurePolicy: Fail
name: validating-create-update-statefulset.kruise.io
namespaceSelector:
matchExpressions:
- key: control-plane
operator: DoesNotExist
rules:
- apiGroups:
- apps.kruise.io
apiVersions:
- v1alpha1
operations:
- CREATE
- UPDATE
resources:
- statefulsets

View File

@ -0,0 +1,27 @@
# Default values for kruise.
revisionHistoryLimit: 3
spec:
nodeAffinity: {}
nodeSelector: {}
tolerations: []
manager:
# settings for log print
log:
# log level for kruise-manager
level: "4"
# resources of kruise-manager container
resources:
limits:
cpu: 100m
memory: 100Mi
requests:
cpu: 100m
memory: 60Mi
metrics:
addr: localhost
port: 8080

View File

@ -0,0 +1,21 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*~
# Various IDEs
.project
.idea/
*.tmproj

View File

@ -0,0 +1,17 @@
apiVersion: v1
name: kruise
description: Helm chart for all kruise-manager components
version: 0.2.0
appVersion: 0.2.0
icon: http://openkruise.io/img/kruise_white.png
keywords:
- kubernetes
- kruise
- workload
- statefulset
- sidecar
- job
- deployment
home: https://openkruise.io
sources:
- https://github.com/openkruise/kruise

View File

@ -0,0 +1,52 @@
# Kruise
## Install
```bash
# wget https://raw.githubusercontent.com/openkruise/kruise/master/hack/auto_generate_charts.sh
# chmod +x auto_generate_charts.sh
# ./auto_generate_charts.sh
# helm install kruise charts/
```
you will see follow:
```
# helm install kruise charts
NAME: kruise
LAST DEPLOYED: 2019-10-10 15:57:30.485362 +0800 CST m=+0.210181363
NAMESPACE: default
STATUS: deployed
```
## Uninstall
```bash
# helm delete kruise
release "kruise" uninstalled
```
## Configuration
The following table lists the configurable parameters of the kruise chart and their default values.
| Parameter | Description | Default |
|-------------------------------------------|--------------------------------------------------------------------|-------------------------------------|
| `log.level` | Log level that kruise-manager printed | `4` |
| `revisionHistoryLimit` | Limit of revision history | `3` |
| `manager.resources.limits.cpu` | CPU resource limit of kruise-manager container | |
| `manager.resources.limits.memory` | Memory resource limit of kruise-manager container | |
| `manager.resources.requests.cpu` | CPU resource request of kruise-manager container | |
| `manager.resources.requests.memory` | Memory resource request of kruise-manager container | |
| `manager.metrics.addr` | Addr of metrics served | `localhost` |
| `manager.metrics.port` | Port of metrics served | `8080` |
| `spec.nodeAffinity` | Node affinity policy for kruise-manager pod | `{}` |
| `spec.nodeSelector` | Node labels for kruise-manager pod | `{}` |
| `spec.tolerations` | Tolerations for kruise-manager pod | `[]`
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,
```bash
# helm install kruise ./ --set manager.log.level=5
```

View File

@ -0,0 +1,32 @@
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "kruise.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "kruise.fullname" -}}
{{- if .Values.fullnameOverride -}}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- if contains $name .Release.Name -}}
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "kruise.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}

View File

@ -0,0 +1,201 @@
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
creationTimestamp: null
labels:
controller-tools.k8s.io: "1.0"
name: broadcastjobs.apps.kruise.io
spec:
additionalPrinterColumns:
- JSONPath: .status.desired
description: The desired number of pods. This is typically equal to the number
of nodes satisfied to run pods.
name: Desired
type: integer
- JSONPath: .status.active
description: The number of actively running pods.
name: Active
type: integer
- JSONPath: .status.succeeded
description: The number of pods which reached phase Succeeded.
name: Succeeded
type: integer
- JSONPath: .status.failed
description: The number of pods which reached phase Failed.
name: Failed
type: integer
- 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.
name: AGE
type: date
group: apps.kruise.io
names:
kind: BroadcastJob
plural: broadcastjobs
shortNames:
- bj
scope: Namespaced
subresources:
status: {}
validation:
openAPIV3Schema:
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/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/api-conventions.md#types-kinds'
type: string
metadata:
type: object
spec:
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
failurePolicy:
description: FailurePolicy indicates the behavior of the job, when failed
pod is found.
properties:
restartLimit:
description: RestartLimit specifies the number of retries before
marking the pod failed.
format: int32
type: integer
type:
description: Type indicates the type of FailurePolicyType.
type: string
type: object
parallelism:
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.
oneOf:
- type: string
- type: integer
paused:
description: Paused will pause the job.
type: boolean
template:
description: Template describes the pod that will be created when executing
a job.
type: object
required:
- template
- completionPolicy
type: object
status:
properties:
active:
description: The number of actively running pods.
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. It is
represented in RFC3339 form and is in UTC.
format: date-time
type: string
conditions:
description: The latest available observations of an object's current
state. +patchMergeKey=type +patchStrategy=merge
items:
properties:
lastProbeTime:
description: Last time the condition was checked.
format: date-time
type: string
lastTransitionTime:
description: Last time the condition transit from one status to
another.
format: date-time
type: string
message:
description: Human readable message indicating details about last
transition.
type: string
reason:
description: (brief) 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 job condition, Complete or Failed.
type: string
required:
- type
- status
type: object
type: array
desired:
description: The desired number of pods, this is typically equal to
the number of nodes satisfied to run pods.
format: int32
type: integer
failed:
description: The number of pods which reached phase Failed.
format: int32
type: integer
phase:
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.
format: date-time
type: string
succeeded:
description: The number of pods which reached phase Succeeded.
format: int32
type: integer
required:
- active
- succeeded
- failed
- desired
- phase
type: object
version: v1alpha1
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []

View File

@ -0,0 +1,118 @@
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
creationTimestamp: null
labels:
controller-tools.k8s.io: "1.0"
name: sidecarsets.apps.kruise.io
spec:
additionalPrinterColumns:
- JSONPath: .status.matchedPods
description: The number of pods matched.
name: MATCHED
type: integer
- JSONPath: .status.updatedPods
description: The number of pods matched and updated.
name: UPDATED
type: integer
- JSONPath: .status.readyPods
description: The number of pods matched and ready.
name: READY
type: integer
- 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.
name: AGE
type: date
group: apps.kruise.io
names:
kind: SidecarSet
plural: sidecarsets
scope: Cluster
subresources:
status: {}
validation:
openAPIV3Schema:
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/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/api-conventions.md#types-kinds'
type: string
metadata:
type: object
spec:
properties:
containers:
description: Containers is the list of sidecar containers to be injected
into the selected pod
items:
type: object
type: array
paused:
description: Paused indicates that the sidecarset is paused and will
not be processed by the sidecarset controller.
type: boolean
selector:
description: selector is a label query over pods that should be injected
type: object
strategy:
description: The sidecarset strategy to use to replace existing pods
with new ones.
properties:
rollingUpdate:
properties:
maxUnavailable:
oneOf:
- type: string
- type: integer
type: object
type: object
volumes:
description: List of volumes that can be mounted by sidecar containers
items:
type: object
type: array
type: object
status:
properties:
matchedPods:
description: matchedPods is the number of Pods whose labels are matched
with this SidecarSet's selector and are created after sidecarset creates
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.
format: int64
type: integer
readyPods:
description: readyPods is the number of matched Pods that have a ready
condition
format: int32
type: integer
updatedPods:
description: updatedPods is the number of matched Pods that are injected
with the latest SidecarSet's containers
format: int32
type: integer
required:
- matchedPods
- updatedPods
- readyPods
type: object
version: v1alpha1
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []

View File

@ -0,0 +1,221 @@
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
creationTimestamp: null
labels:
controller-tools.k8s.io: "1.0"
name: statefulsets.apps.kruise.io
spec:
additionalPrinterColumns:
- JSONPath: .spec.replicas
description: The desired number of pods.
name: DESIRED
type: integer
- JSONPath: .status.replicas
description: The number of currently all pods.
name: CURRENT
type: integer
- JSONPath: .status.updatedReplicas
description: The number of pods updated.
name: UPDATED
type: integer
- JSONPath: .status.readyReplicas
description: The number of pods ready.
name: READY
type: integer
- 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.
name: AGE
type: date
group: apps.kruise.io
names:
kind: StatefulSet
plural: statefulsets
shortNames:
- sts
scope: Namespaced
subresources:
scale:
labelSelectorPath: .status.labelSelector
specReplicasPath: .spec.replicas
statusReplicasPath: .status.replicas
status: {}
validation:
openAPIV3Schema:
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/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/api-conventions.md#types-kinds'
type: string
metadata:
type: object
spec:
properties:
podManagementPolicy:
description: podManagementPolicy controls how pods are created during
initial scale up, when replacing pods on nodes, or when scaling down.
The default policy is `OrderedReady`, where pods are created in increasing
order (pod-0, then pod-1, etc) and the controller will wait until
each pod is ready before continuing. When scaling down, the pods are
removed in the opposite order. The alternative policy is `Parallel`
which will create pods in parallel to match the desired scale without
waiting, and on scale down will delete all pods at once.
type: string
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, but individual replicas also have a consistent
identity. If unspecified, defaults to 1. TODO: Consider a rename of
this field.'
format: int32
type: integer
revisionHistoryLimit:
description: revisionHistoryLimit is the maximum number of revisions
that will be maintained in the StatefulSet's revision history. The
revision history consists of all revisions not represented by a currently
applied StatefulSetSpec version. The default value is 10.
format: int32
type: integer
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'
type: object
serviceName:
description: 'serviceName is the name of the service that governs this
StatefulSet. This service must exist before the StatefulSet, and is
responsible for the network identity of the set. Pods get DNS/hostnames
that follow the pattern: pod-specific-string.serviceName.default.svc.cluster.local
where "pod-specific-string" is managed by the StatefulSet controller.'
type: string
template:
description: template is the object that describes the pod that will
be created if insufficient replicas are detected. Each pod stamped
out by the StatefulSet will fulfill this Template, but have a unique
identity from the rest of the StatefulSet.
type: object
updateStrategy:
description: updateStrategy indicates the StatefulSetUpdateStrategy
that will be employed to update Pods in the StatefulSet when a revision
is made to Template.
properties:
rollingUpdate:
description: RollingUpdate is used to communicate parameters when
Type is RollingUpdateStatefulSetStrategyType.
properties:
maxUnavailable:
description: 'The maximum number of pods that can be unavailable
during the update. Value can be an absolute number (ex: 5)
or a percentage of desired pods (ex: 10%). Absolute number
is calculated from percentage by rounding down. Also, maxUnavailable
can just be allowed to work with Parallel podManagementPolicy.
Defaults to 1.'
oneOf:
- type: string
- type: integer
partition:
description: Partition indicates the ordinal at which the StatefulSet
should be partitioned. Default value is 0.
format: int32
type: integer
paused:
description: Paused indicates that the StatefulSet is paused.
Default value is false
type: boolean
podUpdatePolicy:
description: PodUpdatePolicy indicates how pods should be updated
Default value is "ReCreate"
type: string
type: object
type:
description: Type indicates the type of the StatefulSetUpdateStrategy.
Default is RollingUpdate.
type: string
type: object
volumeClaimTemplates:
description: 'volumeClaimTemplates is a list of claims that pods are
allowed to reference. The StatefulSet controller is responsible for
mapping network identities to claims in a way that maintains the identity
of a pod. Every claim in this list must have at least one matching
(by name) volumeMount in one container in the template. A claim in
this list takes precedence over any volumes in the template, with
the same name. TODO: Define the behavior if a claim already exists
with the same name.'
items:
type: object
type: array
required:
- selector
- template
type: object
status:
properties:
collisionCount:
description: collisionCount is the count of hash collisions for the
StatefulSet. The StatefulSet controller uses this field as a collision
avoidance mechanism when it needs to create the name for the newest
ControllerRevision.
format: int32
type: integer
conditions:
description: Represents the latest available observations of a statefulset's
current state. +patchMergeKey=type +patchStrategy=merge
items:
type: object
type: array
currentReplicas:
description: currentReplicas is the number of Pods created by the StatefulSet
controller from the StatefulSet version indicated by currentRevision.
format: int32
type: integer
currentRevision:
description: currentRevision, if not empty, indicates the version of
the StatefulSet used to generate Pods in the sequence [0,currentReplicas).
type: string
observedGeneration:
description: observedGeneration is the most recent generation observed
for this StatefulSet. It corresponds to the StatefulSet's generation,
which is updated on mutation by the API Server.
format: int64
type: integer
readyReplicas:
description: readyReplicas is the number of Pods created by the StatefulSet
controller that have a Ready Condition.
format: int32
type: integer
replicas:
description: replicas is the number of Pods created by the StatefulSet
controller.
format: int32
type: integer
updateRevision:
description: updateRevision, if not empty, indicates the version of
the StatefulSet used to generate Pods in the sequence [replicas-updatedReplicas,replicas)
type: string
updatedReplicas:
description: updatedReplicas is the number of Pods created by the StatefulSet
controller from the StatefulSet version indicated by updateRevision.
format: int32
type: integer
required:
- replicas
- readyReplicas
- currentReplicas
- updatedReplicas
type: object
version: v1alpha1
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []

View File

@ -0,0 +1,111 @@
apiVersion: v1
kind: Namespace
metadata:
labels:
control-plane: controller-manager
controller-tools.k8s.io: "1.0"
name: kruise-system
---
apiVersion: v1
kind: Service
metadata:
labels:
control-plane: controller-manager
controller-tools.k8s.io: "1.0"
name: kruise-controller-manager-service
namespace: kruise-system
spec:
ports:
- port: 443
selector:
control-plane: controller-manager
controller-tools.k8s.io: "1.0"
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
labels:
control-plane: controller-manager
controller-tools.k8s.io: "1.0"
name: kruise-controller-manager
namespace: kruise-system
spec:
replicas: 1
serviceName: kruise-controller-manager-service
revisionHistoryLimit: {{ .Values.revisionHistoryLimit }}
selector:
matchLabels:
control-plane: controller-manager
controller-tools.k8s.io: "1.0"
template:
metadata:
annotations:
prometheus.io/scrape: "true"
labels:
control-plane: controller-manager
controller-tools.k8s.io: "1.0"
spec:
containers:
- command:
- /manager
args:
- "--metrics-addr={{ .Values.manager.metrics.addr }}:{{ .Values.manager.metrics.port }}"
- "--logtostderr=true"
- "--v={{ .Values.manager.log.level }}"
env:
- name: POD_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: SECRET_NAME
value: kruise-webhook-server-secret
image: openkruise/kruise-manager:v0.2.0
imagePullPolicy: Always
name: manager
ports:
- containerPort: {{ .Values.manager.metrics.port }}
name: metrics
protocol: TCP
- containerPort: 9876
name: webhook-server
protocol: TCP
readinessProbe:
tcpSocket:
port: 9876
resources:
{{- toYaml .Values.manager.resources | nindent 12 }}
volumeMounts:
- mountPath: /tmp/cert
name: cert
readOnly: true
terminationGracePeriodSeconds: 10
{{- if .Values.spec.nodeAffinity }}
affinity:
{{- end }}
{{- with .Values.spec.nodeAffinity }}
nodeAffinity:
{{ toYaml . | indent 10 }}
{{- end }}
{{- if .Values.spec.nodeSelector }}
nodeSelector:
{{ toYaml .Values.spec.nodeSelector | indent 8 }}
{{- end }}
{{- if .Values.spec.tolerations }}
tolerations:
{{ toYaml .Values.spec.tolerations | indent 8 }}
{{- end }}
volumes:
- name: cert
secret:
defaultMode: 420
secretName: kruise-webhook-server-secret
---
apiVersion: v1
kind: Secret
metadata:
name: kruise-webhook-server-secret
namespace: kruise-system

View File

@ -0,0 +1,199 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
creationTimestamp: null
name: kruise-manager-role
rules:
- apiGroups:
- ""
resources:
- pods
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- ""
resources:
- nodes
verbs:
- get
- list
- watch
- apiGroups:
- ""
resources:
- pods/status
verbs:
- get
- update
- patch
- apiGroups:
- apps.kruise.io
resources:
- broadcastjobs
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- apps.kruise.io
resources:
- broadcastjobs/status
verbs:
- get
- update
- patch
- apiGroups:
- ""
resources:
- configmaps
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- apps.kruise.io
resources:
- sidecarsets
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- apps.kruise.io
resources:
- sidecarsets/status
verbs:
- get
- update
- patch
- apiGroups:
- ""
resources:
- pods
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- ""
resources:
- pods/status
verbs:
- get
- update
- patch
- apiGroups:
- ""
resources:
- events
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- ""
resources:
- persistentvolumeclaims
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- apps
resources:
- controllerrevisions
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- apps.kruise.io
resources:
- statefulsets
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- apps.kruise.io
resources:
- statefulsets/status
verbs:
- get
- update
- patch
- apiGroups:
- admissionregistration.k8s.io
resources:
- mutatingwebhookconfigurations
- validatingwebhookconfigurations
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- ""
resources:
- secrets
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- ""
resources:
- services
verbs:
- get
- list
- watch
- create
- update
- patch
- delete

View File

@ -0,0 +1,13 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
creationTimestamp: null
name: kruise-manager-rolebinding
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: kruise-manager-role
subjects:
- kind: ServiceAccount
name: default
namespace: kruise-system

View File

@ -0,0 +1,76 @@
apiVersion: admissionregistration.k8s.io/v1beta1
kind: MutatingWebhookConfiguration
metadata:
name: kruise-mutating-webhook-configuration
---
apiVersion: admissionregistration.k8s.io/v1beta1
kind: ValidatingWebhookConfiguration
metadata:
name: kruise-validating-webhook-configuration
webhooks:
- clientConfig:
caBundle: fake
service:
name: kruise-webhook-server-service
namespace: kruise-system
path: /validating-create-update-broadcastjob
failurePolicy: Fail
name: validating-create-update-broadcastjob.kruise.io
namespaceSelector:
matchExpressions:
- key: control-plane
operator: DoesNotExist
rules:
- apiGroups:
- apps.kruise.io
apiVersions:
- v1alpha1
operations:
- CREATE
- UPDATE
resources:
- broadcastjobs
- clientConfig:
caBundle: fake
service:
name: kruise-webhook-server-service
namespace: kruise-system
path: /validating-create-update-sidecarset
failurePolicy: Fail
name: validating-create-update-sidecarset.kruise.io
namespaceSelector:
matchExpressions:
- key: control-plane
operator: DoesNotExist
rules:
- apiGroups:
- apps.kruise.io
apiVersions:
- v1alpha1
operations:
- CREATE
- UPDATE
resources:
- sidecarsets
- clientConfig:
caBundle: fake
service:
name: kruise-webhook-server-service
namespace: kruise-system
path: /validating-create-update-statefulset
failurePolicy: Fail
name: validating-create-update-statefulset.kruise.io
namespaceSelector:
matchExpressions:
- key: control-plane
operator: DoesNotExist
rules:
- apiGroups:
- apps.kruise.io
apiVersions:
- v1alpha1
operations:
- CREATE
- UPDATE
resources:
- statefulsets

View File

@ -0,0 +1,27 @@
# Default values for kruise.
revisionHistoryLimit: 3
spec:
nodeAffinity: {}
nodeSelector: {}
tolerations: []
manager:
# settings for log print
log:
# log level for kruise-manager
level: "4"
# resources of kruise-manager container
resources:
limits:
cpu: 100m
memory: 100Mi
requests:
cpu: 100m
memory: 60Mi
metrics:
addr: localhost
port: 8080

View File

@ -0,0 +1,21 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*~
# Various IDEs
.project
.idea/
*.tmproj

View File

@ -0,0 +1,17 @@
apiVersion: v1
name: kruise
description: Helm chart for all kruise-manager components
version: 0.3.0
appVersion: 0.3.0
icon: http://openkruise.io/img/kruise_white.png
keywords:
- kubernetes
- kruise
- workload
- statefulset
- sidecar
- job
- deployment
home: https://openkruise.io
sources:
- https://github.com/openkruise/kruise

View File

@ -0,0 +1,52 @@
# Kruise
## Install
```bash
# wget https://raw.githubusercontent.com/openkruise/kruise/master/hack/auto_generate_charts.sh
# chmod +x auto_generate_charts.sh
# ./auto_generate_charts.sh
# helm install kruise charts/
```
you will see follow:
```
# helm install kruise charts
NAME: kruise
LAST DEPLOYED: 2019-10-10 15:57:30.485362 +0800 CST m=+0.210181363
NAMESPACE: default
STATUS: deployed
```
## Uninstall
```bash
# helm delete kruise
release "kruise" uninstalled
```
## Configuration
The following table lists the configurable parameters of the kruise chart and their default values.
| Parameter | Description | Default |
|-------------------------------------------|--------------------------------------------------------------------|-------------------------------------|
| `log.level` | Log level that kruise-manager printed | `4` |
| `revisionHistoryLimit` | Limit of revision history | `3` |
| `manager.resources.limits.cpu` | CPU resource limit of kruise-manager container | |
| `manager.resources.limits.memory` | Memory resource limit of kruise-manager container | |
| `manager.resources.requests.cpu` | CPU resource request of kruise-manager container | |
| `manager.resources.requests.memory` | Memory resource request of kruise-manager container | |
| `manager.metrics.addr` | Addr of metrics served | `localhost` |
| `manager.metrics.port` | Port of metrics served | `8080` |
| `spec.nodeAffinity` | Node affinity policy for kruise-manager pod | `{}` |
| `spec.nodeSelector` | Node labels for kruise-manager pod | `{}` |
| `spec.tolerations` | Tolerations for kruise-manager pod | `[]`
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,
```bash
# helm install kruise ./ --set manager.log.level=5
```

View File

@ -0,0 +1,32 @@
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "kruise.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "kruise.fullname" -}}
{{- if .Values.fullnameOverride -}}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- if contains $name .Release.Name -}}
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "kruise.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}

View File

@ -0,0 +1,201 @@
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
creationTimestamp: null
labels:
controller-tools.k8s.io: "1.0"
name: broadcastjobs.apps.kruise.io
spec:
additionalPrinterColumns:
- JSONPath: .status.desired
description: The desired number of pods. This is typically equal to the number
of nodes satisfied to run pods.
name: Desired
type: integer
- JSONPath: .status.active
description: The number of actively running pods.
name: Active
type: integer
- JSONPath: .status.succeeded
description: The number of pods which reached phase Succeeded.
name: Succeeded
type: integer
- JSONPath: .status.failed
description: The number of pods which reached phase Failed.
name: Failed
type: integer
- 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.
name: AGE
type: date
group: apps.kruise.io
names:
kind: BroadcastJob
plural: broadcastjobs
shortNames:
- bj
scope: Namespaced
subresources:
status: {}
validation:
openAPIV3Schema:
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/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/api-conventions.md#types-kinds'
type: string
metadata:
type: object
spec:
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
failurePolicy:
description: FailurePolicy indicates the behavior of the job, when failed
pod is found.
properties:
restartLimit:
description: RestartLimit specifies the number of retries before
marking the pod failed.
format: int32
type: integer
type:
description: Type indicates the type of FailurePolicyType.
type: string
type: object
parallelism:
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.
oneOf:
- type: string
- type: integer
paused:
description: Paused will pause the job.
type: boolean
template:
description: Template describes the pod that will be created when executing
a job.
type: object
required:
- template
- completionPolicy
type: object
status:
properties:
active:
description: The number of actively running pods.
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. It is
represented in RFC3339 form and is in UTC.
format: date-time
type: string
conditions:
description: The latest available observations of an object's current
state. +patchMergeKey=type +patchStrategy=merge
items:
properties:
lastProbeTime:
description: Last time the condition was checked.
format: date-time
type: string
lastTransitionTime:
description: Last time the condition transit from one status to
another.
format: date-time
type: string
message:
description: Human readable message indicating details about last
transition.
type: string
reason:
description: (brief) 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 job condition, Complete or Failed.
type: string
required:
- type
- status
type: object
type: array
desired:
description: The desired number of pods, this is typically equal to
the number of nodes satisfied to run pods.
format: int32
type: integer
failed:
description: The number of pods which reached phase Failed.
format: int32
type: integer
phase:
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.
format: date-time
type: string
succeeded:
description: The number of pods which reached phase Succeeded.
format: int32
type: integer
required:
- active
- succeeded
- failed
- desired
- phase
type: object
version: v1alpha1
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []

View File

@ -0,0 +1,118 @@
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
creationTimestamp: null
labels:
controller-tools.k8s.io: "1.0"
name: sidecarsets.apps.kruise.io
spec:
additionalPrinterColumns:
- JSONPath: .status.matchedPods
description: The number of pods matched.
name: MATCHED
type: integer
- JSONPath: .status.updatedPods
description: The number of pods matched and updated.
name: UPDATED
type: integer
- JSONPath: .status.readyPods
description: The number of pods matched and ready.
name: READY
type: integer
- 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.
name: AGE
type: date
group: apps.kruise.io
names:
kind: SidecarSet
plural: sidecarsets
scope: Cluster
subresources:
status: {}
validation:
openAPIV3Schema:
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/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/api-conventions.md#types-kinds'
type: string
metadata:
type: object
spec:
properties:
containers:
description: Containers is the list of sidecar containers to be injected
into the selected pod
items:
type: object
type: array
paused:
description: Paused indicates that the sidecarset is paused and will
not be processed by the sidecarset controller.
type: boolean
selector:
description: selector is a label query over pods that should be injected
type: object
strategy:
description: The sidecarset strategy to use to replace existing pods
with new ones.
properties:
rollingUpdate:
properties:
maxUnavailable:
oneOf:
- type: string
- type: integer
type: object
type: object
volumes:
description: List of volumes that can be mounted by sidecar containers
items:
type: object
type: array
type: object
status:
properties:
matchedPods:
description: matchedPods is the number of Pods whose labels are matched
with this SidecarSet's selector and are created after sidecarset creates
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.
format: int64
type: integer
readyPods:
description: readyPods is the number of matched Pods that have a ready
condition
format: int32
type: integer
updatedPods:
description: updatedPods is the number of matched Pods that are injected
with the latest SidecarSet's containers
format: int32
type: integer
required:
- matchedPods
- updatedPods
- readyPods
type: object
version: v1alpha1
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []

View File

@ -0,0 +1,269 @@
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
creationTimestamp: null
labels:
controller-tools.k8s.io: "1.0"
name: statefulsets.apps.kruise.io
spec:
additionalPrinterColumns:
- JSONPath: .spec.replicas
description: The desired number of pods.
name: DESIRED
type: integer
- JSONPath: .status.replicas
description: The number of currently all pods.
name: CURRENT
type: integer
- JSONPath: .status.updatedReplicas
description: The number of pods updated.
name: UPDATED
type: integer
- JSONPath: .status.readyReplicas
description: The number of pods ready.
name: READY
type: integer
- 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.
name: AGE
type: date
group: apps.kruise.io
names:
kind: StatefulSet
plural: statefulsets
shortNames:
- sts
scope: Namespaced
subresources:
scale:
labelSelectorPath: .status.labelSelector
specReplicasPath: .spec.replicas
statusReplicasPath: .status.replicas
status: {}
validation:
openAPIV3Schema:
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/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/api-conventions.md#types-kinds'
type: string
metadata:
type: object
spec:
properties:
podManagementPolicy:
description: podManagementPolicy controls how pods are created during
initial scale up, when replacing pods on nodes, or when scaling down.
The default policy is `OrderedReady`, where pods are created in increasing
order (pod-0, then pod-1, etc) and the controller will wait until
each pod is ready before continuing. When scaling down, the pods are
removed in the opposite order. The alternative policy is `Parallel`
which will create pods in parallel to match the desired scale without
waiting, and on scale down will delete all pods at once.
type: string
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, but individual replicas also have a consistent
identity. If unspecified, defaults to 1. TODO: Consider a rename of
this field.'
format: int32
type: integer
revisionHistoryLimit:
description: revisionHistoryLimit is the maximum number of revisions
that will be maintained in the StatefulSet's revision history. The
revision history consists of all revisions not represented by a currently
applied StatefulSetSpec version. The default value is 10.
format: int32
type: integer
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'
type: object
serviceName:
description: 'serviceName is the name of the service that governs this
StatefulSet. This service must exist before the StatefulSet, and is
responsible for the network identity of the set. Pods get DNS/hostnames
that follow the pattern: pod-specific-string.serviceName.default.svc.cluster.local
where "pod-specific-string" is managed by the StatefulSet controller.'
type: string
template:
description: template is the object that describes the pod that will
be created if insufficient replicas are detected. Each pod stamped
out by the StatefulSet will fulfill this Template, but have a unique
identity from the rest of the StatefulSet.
type: object
updateStrategy:
description: updateStrategy indicates the StatefulSetUpdateStrategy
that will be employed to update Pods in the StatefulSet when a revision
is made to Template.
properties:
rollingUpdate:
description: RollingUpdate is used to communicate parameters when
Type is RollingUpdateStatefulSetStrategyType.
properties:
maxUnavailable:
description: 'The maximum number of pods that can be unavailable
during the update. Value can be an absolute number (ex: 5)
or a percentage of desired pods (ex: 10%). Absolute number
is calculated from percentage by rounding down. Also, maxUnavailable
can just be allowed to work with Parallel podManagementPolicy.
Defaults to 1.'
oneOf:
- type: string
- type: integer
partition:
description: Partition indicates the number of pods with non-updated
revisions when rolling update. This means controller will
update $(replicas - partition) number of pod Default value
is 0.
format: int32
type: integer
paused:
description: Paused indicates that the StatefulSet is paused.
Default value is false
type: boolean
podUpdatePolicy:
description: PodUpdatePolicy indicates how pods should be updated
Default value is "ReCreate"
type: string
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. Also, priorityStrategy
can just be allowed to work with Parallel podManagementPolicy.
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:
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:
properties:
matchSelector:
description: MatchSelector is used to select by pod's
labels.
type: object
weight:
description: Weight associated with matching the corresponding
matchExpressions, in the range 1-100.
format: int32
type: integer
required:
- weight
- matchSelector
type: object
type: array
type: object
type: object
type:
description: Type indicates the type of the StatefulSetUpdateStrategy.
Default is RollingUpdate.
type: string
type: object
volumeClaimTemplates:
description: 'volumeClaimTemplates is a list of claims that pods are
allowed to reference. The StatefulSet controller is responsible for
mapping network identities to claims in a way that maintains the identity
of a pod. Every claim in this list must have at least one matching
(by name) volumeMount in one container in the template. A claim in
this list takes precedence over any volumes in the template, with
the same name. TODO: Define the behavior if a claim already exists
with the same name.'
items:
type: object
type: array
required:
- selector
- template
type: object
status:
properties:
collisionCount:
description: collisionCount is the count of hash collisions for the
StatefulSet. The StatefulSet controller uses this field as a collision
avoidance mechanism when it needs to create the name for the newest
ControllerRevision.
format: int32
type: integer
conditions:
description: Represents the latest available observations of a statefulset's
current state. +patchMergeKey=type +patchStrategy=merge
items:
type: object
type: array
currentReplicas:
description: currentReplicas is the number of Pods created by the StatefulSet
controller from the StatefulSet version indicated by currentRevision.
format: int32
type: integer
currentRevision:
description: currentRevision, if not empty, indicates the version of
the StatefulSet used to generate Pods in the sequence [0,currentReplicas).
type: string
observedGeneration:
description: observedGeneration is the most recent generation observed
for this StatefulSet. It corresponds to the StatefulSet's generation,
which is updated on mutation by the API Server.
format: int64
type: integer
readyReplicas:
description: readyReplicas is the number of Pods created by the StatefulSet
controller that have a Ready Condition.
format: int32
type: integer
replicas:
description: replicas is the number of Pods created by the StatefulSet
controller.
format: int32
type: integer
updateRevision:
description: updateRevision, if not empty, indicates the version of
the StatefulSet used to generate Pods in the sequence [replicas-updatedReplicas,replicas)
type: string
updatedReplicas:
description: updatedReplicas is the number of Pods created by the StatefulSet
controller from the StatefulSet version indicated by updateRevision.
format: int32
type: integer
required:
- replicas
- readyReplicas
- currentReplicas
- updatedReplicas
type: object
version: v1alpha1
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []

View File

@ -0,0 +1,234 @@
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
creationTimestamp: null
labels:
controller-tools.k8s.io: "1.0"
name: uniteddeployments.apps.kruise.io
spec:
additionalPrinterColumns:
- JSONPath: .spec.replicas
description: The desired number of pods.
name: DESIRED
type: integer
- JSONPath: .status.replicas
description: The number of currently all pods.
name: CURRENT
type: integer
- JSONPath: .status.updatedReplicas
description: The number of pods updated.
name: UPDATED
type: integer
- JSONPath: .status.readyReplicas
description: The number of pods ready.
name: READY
type: integer
- 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.
name: AGE
type: date
group: apps.kruise.io
names:
kind: UnitedDeployment
plural: uniteddeployments
shortNames:
- ud
scope: Namespaced
subresources:
scale:
labelSelectorPath: .status.selector
specReplicasPath: .spec.replicas
statusReplicasPath: .status.replicas
status: {}
validation:
openAPIV3Schema:
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/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/api-conventions.md#types-kinds'
type: string
metadata:
type: object
spec:
properties:
replicas:
description: Replicas is the total desired replicas of all the subsets.
If unspecified, defaults to 1.
format: int32
type: integer
revisionHistoryLimit:
description: Indicates the number of histories to be conserved. If unspecified,
defaults to 10.
format: int32
type: integer
selector:
description: Selector is a label query over pods that should match the
replica count. It must match the pod template's labels.
type: object
template:
description: Template describes the subset that will be created.
properties:
statefulSetTemplate:
description: StatefulSet template
properties:
metadata:
type: object
spec:
type: object
required:
- spec
type: object
type: object
topology:
description: Topology describes the pods distribution detail between
each of subsets.
properties:
subsets:
description: Contains the details of each subset. Each element in
this array represents one subset which will be provisioned and
managed by UnitedDeployment.
items:
properties:
name:
description: Indicates subset name as a DNS_LABEL, which will
be used to generate subset workload name prefix in the format
'<deployment-name>-<subset-name>-'. Name should be unique
between all of the subsets under one UnitedDeployment.
type: string
nodeSelectorTerm:
description: Indicates the node selector to form the subset.
Depending on the node selector, pods provisioned could be
distributed across multiple groups of nodes. A subset's
nodeSelectorTerm is not allowed to be updated.
type: object
replicas:
description: Indicates the number of the pod to be created
under this subset. Replicas could also be 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.
oneOf:
- type: string
- type: integer
required:
- name
type: object
type: array
type: object
updateStrategy:
description: UpdateStrategy indicates the strategy the UnitedDeployment
use to preform the update, when template is changed.
properties:
manualUpdate:
description: Includes all of the parameters a Manual update strategy
needs.
properties:
partitions:
description: Indicates number of subset partition.
type: object
type: object
type:
description: Type of UnitedDeployment update strategy. Default is
Manual.
type: string
type: object
required:
- selector
type: object
status:
properties:
collisionCount:
description: Count of hash collisions for the UnitedDeployment. The
UnitedDeployment 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:
description: Represents the latest available observations of a UnitedDeployment's
current state.
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
type: object
type: array
currentRevision:
description: CurrentRevision, if not empty, indicates the current version
of the UnitedDeployment.
type: string
observedGeneration:
description: ObservedGeneration is the most recent generation observed
for this UnitedDeployment. It corresponds to the UnitedDeployment's
generation, which is updated on mutation by the API Server.
format: int64
type: integer
readyReplicas:
description: The number of ready replicas.
format: int32
type: integer
replicas:
description: Replicas is the most recently observed number of replicas.
format: int32
type: integer
subsetReplicas:
description: Records the topology detail information of the replicas
of each subset.
type: object
updateStatus:
description: Records the information of update progress.
properties:
currentPartitions:
description: Records the current partition.
type: object
updatedRevision:
description: Records the latest revision.
type: string
type: object
updatedReadyReplicas:
description: The number of ready current revision replicas for this
UnitedDeployment.
format: int32
type: integer
updatedReplicas:
description: The number of pods in current version.
format: int32
type: integer
required:
- replicas
- updatedReplicas
- currentRevision
type: object
version: v1alpha1
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []

View File

@ -0,0 +1,111 @@
apiVersion: v1
kind: Namespace
metadata:
labels:
control-plane: controller-manager
controller-tools.k8s.io: "1.0"
name: kruise-system
---
apiVersion: v1
kind: Service
metadata:
labels:
control-plane: controller-manager
controller-tools.k8s.io: "1.0"
name: kruise-controller-manager-service
namespace: kruise-system
spec:
ports:
- port: 443
selector:
control-plane: controller-manager
controller-tools.k8s.io: "1.0"
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
labels:
control-plane: controller-manager
controller-tools.k8s.io: "1.0"
name: kruise-controller-manager
namespace: kruise-system
spec:
replicas: 1
serviceName: kruise-controller-manager-service
revisionHistoryLimit: {{ .Values.revisionHistoryLimit }}
selector:
matchLabels:
control-plane: controller-manager
controller-tools.k8s.io: "1.0"
template:
metadata:
annotations:
prometheus.io/scrape: "true"
labels:
control-plane: controller-manager
controller-tools.k8s.io: "1.0"
spec:
containers:
- command:
- /manager
args:
- "--metrics-addr={{ .Values.manager.metrics.addr }}:{{ .Values.manager.metrics.port }}"
- "--logtostderr=true"
- "--v={{ .Values.manager.log.level }}"
env:
- name: POD_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: SECRET_NAME
value: kruise-webhook-server-secret
image: openkruise/kruise-manager:v0.3.0
imagePullPolicy: Always
name: manager
ports:
- containerPort: {{ .Values.manager.metrics.port }}
name: metrics
protocol: TCP
- containerPort: 9876
name: webhook-server
protocol: TCP
readinessProbe:
tcpSocket:
port: 9876
resources:
{{- toYaml .Values.manager.resources | nindent 12 }}
volumeMounts:
- mountPath: /tmp/cert
name: cert
readOnly: true
terminationGracePeriodSeconds: 10
{{- if .Values.spec.nodeAffinity }}
affinity:
{{- end }}
{{- with .Values.spec.nodeAffinity }}
nodeAffinity:
{{ toYaml . | indent 10 }}
{{- end }}
{{- if .Values.spec.nodeSelector }}
nodeSelector:
{{ toYaml .Values.spec.nodeSelector | indent 8 }}
{{- end }}
{{- if .Values.spec.tolerations }}
tolerations:
{{ toYaml .Values.spec.tolerations | indent 8 }}
{{- end }}
volumes:
- name: cert
secret:
defaultMode: 420
secretName: kruise-webhook-server-secret
---
apiVersion: v1
kind: Secret
metadata:
name: kruise-webhook-server-secret
namespace: kruise-system

View File

@ -0,0 +1,239 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
creationTimestamp: null
name: kruise-manager-role
rules:
- apiGroups:
- ""
resources:
- pods
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- ""
resources:
- nodes
verbs:
- get
- list
- watch
- apiGroups:
- ""
resources:
- pods/status
verbs:
- get
- update
- patch
- apiGroups:
- apps.kruise.io
resources:
- broadcastjobs
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- apps.kruise.io
resources:
- broadcastjobs/status
verbs:
- get
- update
- patch
- apiGroups:
- ""
resources:
- configmaps
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- apps.kruise.io
resources:
- sidecarsets
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- apps.kruise.io
resources:
- sidecarsets/status
verbs:
- get
- update
- patch
- apiGroups:
- ""
resources:
- pods
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- ""
resources:
- pods/status
verbs:
- get
- update
- patch
- apiGroups:
- ""
resources:
- events
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- ""
resources:
- persistentvolumeclaims
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- apps
resources:
- controllerrevisions
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- apps.kruise.io
resources:
- statefulsets
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- apps.kruise.io
resources:
- statefulsets/status
verbs:
- get
- update
- patch
- apiGroups:
- apps.kruise.io
resources:
- uniteddeployments
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- apps.kruise.io
resources:
- uniteddeployments/status
verbs:
- get
- update
- patch
- apiGroups:
- apps
resources:
- statefulsets
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- apps
resources:
- statefulsets/status
verbs:
- get
- update
- patch
- apiGroups:
- admissionregistration.k8s.io
resources:
- mutatingwebhookconfigurations
- validatingwebhookconfigurations
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- ""
resources:
- secrets
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- ""
resources:
- services
verbs:
- get
- list
- watch
- create
- update
- patch
- delete

View File

@ -0,0 +1,13 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
creationTimestamp: null
name: kruise-manager-rolebinding
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: kruise-manager-role
subjects:
- kind: ServiceAccount
name: default
namespace: kruise-system

View File

@ -0,0 +1,98 @@
apiVersion: admissionregistration.k8s.io/v1beta1
kind: MutatingWebhookConfiguration
metadata:
name: kruise-mutating-webhook-configuration
---
apiVersion: admissionregistration.k8s.io/v1beta1
kind: ValidatingWebhookConfiguration
metadata:
name: kruise-validating-webhook-configuration
webhooks:
- clientConfig:
caBundle: fake
service:
name: kruise-webhook-server-service
namespace: kruise-system
path: /validating-create-update-broadcastjob
failurePolicy: Fail
name: validating-create-update-broadcastjob.kruise.io
namespaceSelector:
matchExpressions:
- key: control-plane
operator: DoesNotExist
rules:
- apiGroups:
- apps.kruise.io
apiVersions:
- v1alpha1
operations:
- CREATE
- UPDATE
resources:
- broadcastjobs
- clientConfig:
caBundle: fake
service:
name: kruise-webhook-server-service
namespace: kruise-system
path: /validating-create-update-sidecarset
failurePolicy: Fail
name: validating-create-update-sidecarset.kruise.io
namespaceSelector:
matchExpressions:
- key: control-plane
operator: DoesNotExist
rules:
- apiGroups:
- apps.kruise.io
apiVersions:
- v1alpha1
operations:
- CREATE
- UPDATE
resources:
- sidecarsets
- clientConfig:
caBundle: fake
service:
name: kruise-webhook-server-service
namespace: kruise-system
path: /validating-create-update-statefulset
failurePolicy: Fail
name: validating-create-update-statefulset.kruise.io
namespaceSelector:
matchExpressions:
- key: control-plane
operator: DoesNotExist
rules:
- apiGroups:
- apps.kruise.io
apiVersions:
- v1alpha1
operations:
- CREATE
- UPDATE
resources:
- statefulsets
- clientConfig:
caBundle: fake
service:
name: kruise-webhook-server-service
namespace: kruise-system
path: /validating-create-update-uniteddeployment
failurePolicy: Fail
name: validating-create-update-uniteddeployment.kruise.io
namespaceSelector:
matchExpressions:
- key: control-plane
operator: DoesNotExist
rules:
- apiGroups:
- apps.kruise.io
apiVersions:
- v1alpha1
operations:
- CREATE
- UPDATE
resources:
- uniteddeployments

View File

@ -0,0 +1,27 @@
# Default values for kruise.
revisionHistoryLimit: 3
spec:
nodeAffinity: {}
nodeSelector: {}
tolerations: []
manager:
# settings for log print
log:
# log level for kruise-manager
level: "4"
# resources of kruise-manager container
resources:
limits:
cpu: 100m
memory: 100Mi
requests:
cpu: 100m
memory: 60Mi
metrics:
addr: localhost
port: 8080

View File

@ -0,0 +1,17 @@
apiVersion: v1
name: kruise
description: Helm chart for all kruise-manager components
version: 0.3.1
appVersion: 0.3.1
icon: http://openkruise.io/img/kruise_white.png
keywords:
- kubernetes
- kruise
- workload
- statefulset
- sidecar
- job
- deployment
home: https://openkruise.io
sources:
- https://github.com/openkruise/kruise

View File

@ -0,0 +1,49 @@
# Kruise
## Install
```bash
helm install kruise https://github.com/openkruise/kruise/releases/download/v0.3.1/kruise-chart.tgz
```
you will see follow:
```
NAME: kruise
LAST DEPLOYED: Mon Jan 6 14:47:48 2020
NAMESPACE: default
STATUS: deployed
REVISION: 1
TEST SUITE: None
```
## Uninstall
```bash
$ helm delete kruise
release "kruise" uninstalled
```
## Configuration
The following table lists the configurable parameters of the kruise chart and their default values.
| Parameter | Description | Default |
|-------------------------------------------|--------------------------------------------------------------------|-------------------------------------|
| `log.level` | Log level that kruise-manager printed | `4` |
| `revisionHistoryLimit` | Limit of revision history | `3` |
| `manager.resources.limits.cpu` | CPU resource limit of kruise-manager container | |
| `manager.resources.limits.memory` | Memory resource limit of kruise-manager container | |
| `manager.resources.requests.cpu` | CPU resource request of kruise-manager container | |
| `manager.resources.requests.memory` | Memory resource request of kruise-manager container | |
| `manager.metrics.addr` | Addr of metrics served | `localhost` |
| `manager.metrics.port` | Port of metrics served | `8080` |
| `spec.nodeAffinity` | Node affinity policy for kruise-manager pod | `{}` |
| `spec.nodeSelector` | Node labels for kruise-manager pod | `{}` |
| `spec.tolerations` | Tolerations for kruise-manager pod | `[]`
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,
```bash
# helm install kruise https://github.com/openkruise/kruise/releases/download/v0.3.1/kruise-chart.tgz --set manager.log.level=5
```

View File

@ -0,0 +1,201 @@
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
creationTimestamp: null
labels:
controller-tools.k8s.io: "1.0"
name: broadcastjobs.apps.kruise.io
spec:
additionalPrinterColumns:
- JSONPath: .status.desired
description: The desired number of pods. This is typically equal to the number
of nodes satisfied to run pods.
name: Desired
type: integer
- JSONPath: .status.active
description: The number of actively running pods.
name: Active
type: integer
- JSONPath: .status.succeeded
description: The number of pods which reached phase Succeeded.
name: Succeeded
type: integer
- JSONPath: .status.failed
description: The number of pods which reached phase Failed.
name: Failed
type: integer
- 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.
name: AGE
type: date
group: apps.kruise.io
names:
kind: BroadcastJob
plural: broadcastjobs
shortNames:
- bj
scope: Namespaced
subresources:
status: {}
validation:
openAPIV3Schema:
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/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/api-conventions.md#types-kinds'
type: string
metadata:
type: object
spec:
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
failurePolicy:
description: FailurePolicy indicates the behavior of the job, when failed
pod is found.
properties:
restartLimit:
description: RestartLimit specifies the number of retries before
marking the pod failed.
format: int32
type: integer
type:
description: Type indicates the type of FailurePolicyType.
type: string
type: object
parallelism:
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.
oneOf:
- type: string
- type: integer
paused:
description: Paused will pause the job.
type: boolean
template:
description: Template describes the pod that will be created when executing
a job.
type: object
required:
- template
- completionPolicy
type: object
status:
properties:
active:
description: The number of actively running pods.
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. It is
represented in RFC3339 form and is in UTC.
format: date-time
type: string
conditions:
description: The latest available observations of an object's current
state. +patchMergeKey=type +patchStrategy=merge
items:
properties:
lastProbeTime:
description: Last time the condition was checked.
format: date-time
type: string
lastTransitionTime:
description: Last time the condition transit from one status to
another.
format: date-time
type: string
message:
description: Human readable message indicating details about last
transition.
type: string
reason:
description: (brief) 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 job condition, Complete or Failed.
type: string
required:
- type
- status
type: object
type: array
desired:
description: The desired number of pods, this is typically equal to
the number of nodes satisfied to run pods.
format: int32
type: integer
failed:
description: The number of pods which reached phase Failed.
format: int32
type: integer
phase:
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.
format: date-time
type: string
succeeded:
description: The number of pods which reached phase Succeeded.
format: int32
type: integer
required:
- active
- succeeded
- failed
- desired
- phase
type: object
version: v1alpha1
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []

View File

@ -0,0 +1,118 @@
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
creationTimestamp: null
labels:
controller-tools.k8s.io: "1.0"
name: sidecarsets.apps.kruise.io
spec:
additionalPrinterColumns:
- JSONPath: .status.matchedPods
description: The number of pods matched.
name: MATCHED
type: integer
- JSONPath: .status.updatedPods
description: The number of pods matched and updated.
name: UPDATED
type: integer
- JSONPath: .status.readyPods
description: The number of pods matched and ready.
name: READY
type: integer
- 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.
name: AGE
type: date
group: apps.kruise.io
names:
kind: SidecarSet
plural: sidecarsets
scope: Cluster
subresources:
status: {}
validation:
openAPIV3Schema:
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/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/api-conventions.md#types-kinds'
type: string
metadata:
type: object
spec:
properties:
containers:
description: Containers is the list of sidecar containers to be injected
into the selected pod
items:
type: object
type: array
paused:
description: Paused indicates that the sidecarset is paused and will
not be processed by the sidecarset controller.
type: boolean
selector:
description: selector is a label query over pods that should be injected
type: object
strategy:
description: The sidecarset strategy to use to replace existing pods
with new ones.
properties:
rollingUpdate:
properties:
maxUnavailable:
oneOf:
- type: string
- type: integer
type: object
type: object
volumes:
description: List of volumes that can be mounted by sidecar containers
items:
type: object
type: array
type: object
status:
properties:
matchedPods:
description: matchedPods is the number of Pods whose labels are matched
with this SidecarSet's selector and are created after sidecarset creates
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.
format: int64
type: integer
readyPods:
description: readyPods is the number of matched Pods that have a ready
condition
format: int32
type: integer
updatedPods:
description: updatedPods is the number of matched Pods that are injected
with the latest SidecarSet's containers
format: int32
type: integer
required:
- matchedPods
- updatedPods
- readyPods
type: object
version: v1alpha1
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []

View File

@ -0,0 +1,279 @@
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
creationTimestamp: null
labels:
controller-tools.k8s.io: "1.0"
name: statefulsets.apps.kruise.io
spec:
additionalPrinterColumns:
- JSONPath: .spec.replicas
description: The desired number of pods.
name: DESIRED
type: integer
- JSONPath: .status.replicas
description: The number of currently all pods.
name: CURRENT
type: integer
- JSONPath: .status.updatedReplicas
description: The number of pods updated.
name: UPDATED
type: integer
- JSONPath: .status.readyReplicas
description: The number of pods ready.
name: READY
type: integer
- 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.
name: AGE
type: date
group: apps.kruise.io
names:
kind: StatefulSet
plural: statefulsets
shortNames:
- sts
scope: Namespaced
subresources:
scale:
labelSelectorPath: .status.labelSelector
specReplicasPath: .spec.replicas
statusReplicasPath: .status.replicas
status: {}
validation:
openAPIV3Schema:
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/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/api-conventions.md#types-kinds'
type: string
metadata:
type: object
spec:
properties:
podManagementPolicy:
description: podManagementPolicy controls how pods are created during
initial scale up, when replacing pods on nodes, or when scaling down.
The default policy is `OrderedReady`, where pods are created in increasing
order (pod-0, then pod-1, etc) and the controller will wait until
each pod is ready before continuing. When scaling down, the pods are
removed in the opposite order. The alternative policy is `Parallel`
which will create pods in parallel to match the desired scale without
waiting, and on scale down will delete all pods at once.
type: string
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, but individual replicas also have a consistent
identity. If unspecified, defaults to 1. TODO: Consider a rename of
this field.'
format: int32
type: integer
revisionHistoryLimit:
description: revisionHistoryLimit is the maximum number of revisions
that will be maintained in the StatefulSet's revision history. The
revision history consists of all revisions not represented by a currently
applied StatefulSetSpec version. The default value is 10.
format: int32
type: integer
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'
type: object
serviceName:
description: 'serviceName is the name of the service that governs this
StatefulSet. This service must exist before the StatefulSet, and is
responsible for the network identity of the set. Pods get DNS/hostnames
that follow the pattern: pod-specific-string.serviceName.default.svc.cluster.local
where "pod-specific-string" is managed by the StatefulSet controller.'
type: string
template:
description: template is the object that describes the pod that will
be created if insufficient replicas are detected. Each pod stamped
out by the StatefulSet will fulfill this Template, but have a unique
identity from the rest of the StatefulSet.
type: object
updateStrategy:
description: updateStrategy indicates the StatefulSetUpdateStrategy
that will be employed to update Pods in the StatefulSet when a revision
is made to Template.
properties:
rollingUpdate:
description: RollingUpdate is used to communicate parameters when
Type is RollingUpdateStatefulSetStrategyType.
properties:
maxUnavailable:
description: 'The maximum number of pods that can be unavailable
during the update. Value can be an absolute number (ex: 5)
or a percentage of desired pods (ex: 10%). Absolute number
is calculated from percentage by rounding down. Also, maxUnavailable
can just be allowed to work with Parallel podManagementPolicy.
Defaults to 1.'
oneOf:
- type: string
- type: integer
partition:
description: '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. - It means controller
will update $(replicas - partition) number of pod. Default
value is 0.'
format: int32
type: integer
paused:
description: Paused indicates that the StatefulSet is paused.
Default value is false
type: boolean
podUpdatePolicy:
description: PodUpdatePolicy indicates how pods should be updated
Default value is "ReCreate"
type: string
unorderedUpdate:
description: UnorderedUpdate contains strategies for non-ordered
update. If it is not nil, pods will be updated with non-ordered
sequence. Noted that UnorderedUpdate can only be allowed to
work with Parallel podManagementPolicy
properties:
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:
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:
properties:
matchSelector:
description: MatchSelector is used to select by
pod's labels.
type: object
weight:
description: Weight associated with matching the
corresponding matchExpressions, in the range
1-100.
format: int32
type: integer
required:
- weight
- matchSelector
type: object
type: array
type: object
type: object
type: object
type:
description: Type indicates the type of the StatefulSetUpdateStrategy.
Default is RollingUpdate.
type: string
type: object
volumeClaimTemplates:
description: 'volumeClaimTemplates is a list of claims that pods are
allowed to reference. The StatefulSet controller is responsible for
mapping network identities to claims in a way that maintains the identity
of a pod. Every claim in this list must have at least one matching
(by name) volumeMount in one container in the template. A claim in
this list takes precedence over any volumes in the template, with
the same name. TODO: Define the behavior if a claim already exists
with the same name.'
items:
type: object
type: array
required:
- selector
- template
type: object
status:
properties:
collisionCount:
description: collisionCount is the count of hash collisions for the
StatefulSet. The StatefulSet controller uses this field as a collision
avoidance mechanism when it needs to create the name for the newest
ControllerRevision.
format: int32
type: integer
conditions:
description: Represents the latest available observations of a statefulset's
current state. +patchMergeKey=type +patchStrategy=merge
items:
type: object
type: array
currentReplicas:
description: currentReplicas is the number of Pods created by the StatefulSet
controller from the StatefulSet version indicated by currentRevision.
format: int32
type: integer
currentRevision:
description: currentRevision, if not empty, indicates the version of
the StatefulSet used to generate Pods in the sequence [0,currentReplicas).
type: string
observedGeneration:
description: observedGeneration is the most recent generation observed
for this StatefulSet. It corresponds to the StatefulSet's generation,
which is updated on mutation by the API Server.
format: int64
type: integer
readyReplicas:
description: readyReplicas is the number of Pods created by the StatefulSet
controller that have a Ready Condition.
format: int32
type: integer
replicas:
description: replicas is the number of Pods created by the StatefulSet
controller.
format: int32
type: integer
updateRevision:
description: updateRevision, if not empty, indicates the version of
the StatefulSet used to generate Pods in the sequence [replicas-updatedReplicas,replicas)
type: string
updatedReplicas:
description: updatedReplicas is the number of Pods created by the StatefulSet
controller from the StatefulSet version indicated by updateRevision.
format: int32
type: integer
required:
- replicas
- readyReplicas
- currentReplicas
- updatedReplicas
type: object
version: v1alpha1
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []

View File

@ -0,0 +1,234 @@
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
creationTimestamp: null
labels:
controller-tools.k8s.io: "1.0"
name: uniteddeployments.apps.kruise.io
spec:
additionalPrinterColumns:
- JSONPath: .spec.replicas
description: The desired number of pods.
name: DESIRED
type: integer
- JSONPath: .status.replicas
description: The number of currently all pods.
name: CURRENT
type: integer
- JSONPath: .status.updatedReplicas
description: The number of pods updated.
name: UPDATED
type: integer
- JSONPath: .status.readyReplicas
description: The number of pods ready.
name: READY
type: integer
- 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.
name: AGE
type: date
group: apps.kruise.io
names:
kind: UnitedDeployment
plural: uniteddeployments
shortNames:
- ud
scope: Namespaced
subresources:
scale:
labelSelectorPath: .status.selector
specReplicasPath: .spec.replicas
statusReplicasPath: .status.replicas
status: {}
validation:
openAPIV3Schema:
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/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/api-conventions.md#types-kinds'
type: string
metadata:
type: object
spec:
properties:
replicas:
description: Replicas is the total desired replicas of all the subsets.
If unspecified, defaults to 1.
format: int32
type: integer
revisionHistoryLimit:
description: Indicates the number of histories to be conserved. If unspecified,
defaults to 10.
format: int32
type: integer
selector:
description: Selector is a label query over pods that should match the
replica count. It must match the pod template's labels.
type: object
template:
description: Template describes the subset that will be created.
properties:
statefulSetTemplate:
description: StatefulSet template
properties:
metadata:
type: object
spec:
type: object
required:
- spec
type: object
type: object
topology:
description: Topology describes the pods distribution detail between
each of subsets.
properties:
subsets:
description: Contains the details of each subset. Each element in
this array represents one subset which will be provisioned and
managed by UnitedDeployment.
items:
properties:
name:
description: Indicates subset name as a DNS_LABEL, which will
be used to generate subset workload name prefix in the format
'<deployment-name>-<subset-name>-'. Name should be unique
between all of the subsets under one UnitedDeployment.
type: string
nodeSelectorTerm:
description: Indicates the node selector to form the subset.
Depending on the node selector, pods provisioned could be
distributed across multiple groups of nodes. A subset's
nodeSelectorTerm is not allowed to be updated.
type: object
replicas:
description: Indicates the number of the pod to be created
under this subset. Replicas could also be 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.
oneOf:
- type: string
- type: integer
required:
- name
type: object
type: array
type: object
updateStrategy:
description: UpdateStrategy indicates the strategy the UnitedDeployment
use to preform the update, when template is changed.
properties:
manualUpdate:
description: Includes all of the parameters a Manual update strategy
needs.
properties:
partitions:
description: Indicates number of subset partition.
type: object
type: object
type:
description: Type of UnitedDeployment update strategy. Default is
Manual.
type: string
type: object
required:
- selector
type: object
status:
properties:
collisionCount:
description: Count of hash collisions for the UnitedDeployment. The
UnitedDeployment 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:
description: Represents the latest available observations of a UnitedDeployment's
current state.
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
type: object
type: array
currentRevision:
description: CurrentRevision, if not empty, indicates the current version
of the UnitedDeployment.
type: string
observedGeneration:
description: ObservedGeneration is the most recent generation observed
for this UnitedDeployment. It corresponds to the UnitedDeployment's
generation, which is updated on mutation by the API Server.
format: int64
type: integer
readyReplicas:
description: The number of ready replicas.
format: int32
type: integer
replicas:
description: Replicas is the most recently observed number of replicas.
format: int32
type: integer
subsetReplicas:
description: Records the topology detail information of the replicas
of each subset.
type: object
updateStatus:
description: Records the information of update progress.
properties:
currentPartitions:
description: Records the current partition.
type: object
updatedRevision:
description: Records the latest revision.
type: string
type: object
updatedReadyReplicas:
description: The number of ready current revision replicas for this
UnitedDeployment.
format: int32
type: integer
updatedReplicas:
description: The number of pods in current version.
format: int32
type: integer
required:
- replicas
- updatedReplicas
- currentRevision
type: object
version: v1alpha1
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []

View File

@ -0,0 +1,111 @@
apiVersion: v1
kind: Namespace
metadata:
labels:
control-plane: controller-manager
controller-tools.k8s.io: "1.0"
name: kruise-system
---
apiVersion: v1
kind: Service
metadata:
labels:
control-plane: controller-manager
controller-tools.k8s.io: "1.0"
name: kruise-controller-manager-service
namespace: kruise-system
spec:
ports:
- port: 443
selector:
control-plane: controller-manager
controller-tools.k8s.io: "1.0"
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
labels:
control-plane: controller-manager
controller-tools.k8s.io: "1.0"
name: kruise-controller-manager
namespace: kruise-system
spec:
replicas: 1
serviceName: kruise-controller-manager-service
revisionHistoryLimit: {{ .Values.revisionHistoryLimit }}
selector:
matchLabels:
control-plane: controller-manager
controller-tools.k8s.io: "1.0"
template:
metadata:
annotations:
prometheus.io/scrape: "true"
labels:
control-plane: controller-manager
controller-tools.k8s.io: "1.0"
spec:
containers:
- command:
- /manager
args:
- "--metrics-addr={{ .Values.manager.metrics.addr }}:{{ .Values.manager.metrics.port }}"
- "--logtostderr=true"
- "--v={{ .Values.manager.log.level }}"
env:
- name: POD_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: SECRET_NAME
value: kruise-webhook-server-secret
image: openkruise/kruise-manager:v0.3.1
imagePullPolicy: Always
name: manager
ports:
- containerPort: {{ .Values.manager.metrics.port }}
name: metrics
protocol: TCP
- containerPort: 9876
name: webhook-server
protocol: TCP
readinessProbe:
tcpSocket:
port: 9876
resources:
{{- toYaml .Values.manager.resources | nindent 12 }}
volumeMounts:
- mountPath: /tmp/cert
name: cert
readOnly: true
terminationGracePeriodSeconds: 10
{{- if .Values.spec.nodeAffinity }}
affinity:
{{- end }}
{{- with .Values.spec.nodeAffinity }}
nodeAffinity:
{{ toYaml . | indent 10 }}
{{- end }}
{{- if .Values.spec.nodeSelector }}
nodeSelector:
{{ toYaml .Values.spec.nodeSelector | indent 8 }}
{{- end }}
{{- if .Values.spec.tolerations }}
tolerations:
{{ toYaml .Values.spec.tolerations | indent 8 }}
{{- end }}
volumes:
- name: cert
secret:
defaultMode: 420
secretName: kruise-webhook-server-secret
---
apiVersion: v1
kind: Secret
metadata:
name: kruise-webhook-server-secret
namespace: kruise-system

View File

@ -0,0 +1,315 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
creationTimestamp: null
name: kruise-manager-role
rules:
- apiGroups:
- ""
resources:
- pods
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- ""
resources:
- nodes
verbs:
- get
- list
- watch
- apiGroups:
- ""
resources:
- pods/status
verbs:
- get
- update
- patch
- apiGroups:
- apps.kruise.io
resources:
- broadcastjobs
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- apps.kruise.io
resources:
- broadcastjobs/status
verbs:
- get
- update
- patch
- apiGroups:
- ""
resources:
- pods
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- ""
resources:
- pods/status
verbs:
- get
- update
- patch
- apiGroups:
- ""
resources:
- events
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- ""
resources:
- persistentvolumeclaims
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- apps
resources:
- controllerrevisions
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- apps.kruise.io
resources:
- clonesets
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- apps.kruise.io
resources:
- clonesets/status
verbs:
- get
- update
- patch
- apiGroups:
- ""
resources:
- configmaps
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- apps.kruise.io
resources:
- sidecarsets
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- apps.kruise.io
resources:
- sidecarsets/status
verbs:
- get
- update
- patch
- apiGroups:
- ""
resources:
- pods
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- ""
resources:
- pods/status
verbs:
- get
- update
- patch
- apiGroups:
- ""
resources:
- events
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- ""
resources:
- persistentvolumeclaims
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- apps
resources:
- controllerrevisions
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- apps.kruise.io
resources:
- statefulsets
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- apps.kruise.io
resources:
- statefulsets/status
verbs:
- get
- update
- patch
- apiGroups:
- apps.kruise.io
resources:
- uniteddeployments
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- apps.kruise.io
resources:
- uniteddeployments/status
verbs:
- get
- update
- patch
- apiGroups:
- apps
resources:
- statefulsets
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- apps
resources:
- statefulsets/status
verbs:
- get
- update
- patch
- apiGroups:
- admissionregistration.k8s.io
resources:
- mutatingwebhookconfigurations
- validatingwebhookconfigurations
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- ""
resources:
- secrets
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- ""
resources:
- services
verbs:
- get
- list
- watch
- create
- update
- patch
- delete

View File

@ -0,0 +1,13 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
creationTimestamp: null
name: kruise-manager-rolebinding
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: kruise-manager-role
subjects:
- kind: ServiceAccount
name: default
namespace: kruise-system

View File

@ -0,0 +1,98 @@
apiVersion: admissionregistration.k8s.io/v1beta1
kind: MutatingWebhookConfiguration
metadata:
name: kruise-mutating-webhook-configuration
---
apiVersion: admissionregistration.k8s.io/v1beta1
kind: ValidatingWebhookConfiguration
metadata:
name: kruise-validating-webhook-configuration
webhooks:
- clientConfig:
caBundle: fake
service:
name: kruise-webhook-server-service
namespace: kruise-system
path: /validating-create-update-broadcastjob
failurePolicy: Fail
name: validating-create-update-broadcastjob.kruise.io
namespaceSelector:
matchExpressions:
- key: control-plane
operator: DoesNotExist
rules:
- apiGroups:
- apps.kruise.io
apiVersions:
- v1alpha1
operations:
- CREATE
- UPDATE
resources:
- broadcastjobs
- clientConfig:
caBundle: fake
service:
name: kruise-webhook-server-service
namespace: kruise-system
path: /validating-create-update-sidecarset
failurePolicy: Fail
name: validating-create-update-sidecarset.kruise.io
namespaceSelector:
matchExpressions:
- key: control-plane
operator: DoesNotExist
rules:
- apiGroups:
- apps.kruise.io
apiVersions:
- v1alpha1
operations:
- CREATE
- UPDATE
resources:
- sidecarsets
- clientConfig:
caBundle: fake
service:
name: kruise-webhook-server-service
namespace: kruise-system
path: /validating-create-update-statefulset
failurePolicy: Fail
name: validating-create-update-statefulset.kruise.io
namespaceSelector:
matchExpressions:
- key: control-plane
operator: DoesNotExist
rules:
- apiGroups:
- apps.kruise.io
apiVersions:
- v1alpha1
operations:
- CREATE
- UPDATE
resources:
- statefulsets
- clientConfig:
caBundle: fake
service:
name: kruise-webhook-server-service
namespace: kruise-system
path: /validating-create-update-uniteddeployment
failurePolicy: Fail
name: validating-create-update-uniteddeployment.kruise.io
namespaceSelector:
matchExpressions:
- key: control-plane
operator: DoesNotExist
rules:
- apiGroups:
- apps.kruise.io
apiVersions:
- v1alpha1
operations:
- CREATE
- UPDATE
resources:
- uniteddeployments

View File

@ -0,0 +1,27 @@
# Default values for kruise.
revisionHistoryLimit: 3
spec:
nodeAffinity: {}
nodeSelector: {}
tolerations: []
manager:
# settings for log print
log:
# log level for kruise-manager
level: "4"
# resources of kruise-manager container
resources:
limits:
cpu: 100m
memory: 256Mi
requests:
cpu: 100m
memory: 256Mi
metrics:
addr: localhost
port: 8080

View File

@ -0,0 +1,17 @@
apiVersion: v1
name: kruise
description: Helm chart for all kruise-manager components
version: 0.4.0
appVersion: 0.4.0
icon: http://openkruise.io/img/kruise_white.png
keywords:
- kubernetes
- kruise
- workload
- statefulset
- sidecar
- job
- deployment
home: https://openkruise.io
sources:
- https://github.com/openkruise/kruise

View File

@ -0,0 +1,49 @@
# Kruise
## Install
```bash
helm install kruise https://github.com/openkruise/kruise/releases/download/v0.4.0/kruise-chart.tgz
```
you will see follow:
```
NAME: kruise
LAST DEPLOYED: Mon Jan 6 14:47:48 2020
NAMESPACE: default
STATUS: deployed
REVISION: 1
TEST SUITE: None
```
## Uninstall
```bash
$ helm delete kruise
release "kruise" uninstalled
```
## Configuration
The following table lists the configurable parameters of the kruise chart and their default values.
| Parameter | Description | Default |
|-------------------------------------------|--------------------------------------------------------------------|-------------------------------------|
| `log.level` | Log level that kruise-manager printed | `4` |
| `revisionHistoryLimit` | Limit of revision history | `3` |
| `manager.resources.limits.cpu` | CPU resource limit of kruise-manager container | |
| `manager.resources.limits.memory` | Memory resource limit of kruise-manager container | |
| `manager.resources.requests.cpu` | CPU resource request of kruise-manager container | |
| `manager.resources.requests.memory` | Memory resource request of kruise-manager container | |
| `manager.metrics.addr` | Addr of metrics served | `localhost` |
| `manager.metrics.port` | Port of metrics served | `8080` |
| `spec.nodeAffinity` | Node affinity policy for kruise-manager pod | `{}` |
| `spec.nodeSelector` | Node labels for kruise-manager pod | `{}` |
| `spec.tolerations` | Tolerations for kruise-manager pod | `[]`
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,
```bash
# helm install kruise https://github.com/openkruise/kruise/releases/download/v0.4.0/kruise-chart.tgz --set manager.log.level=5
```

View File

@ -0,0 +1,201 @@
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
creationTimestamp: null
labels:
controller-tools.k8s.io: "1.0"
name: broadcastjobs.apps.kruise.io
spec:
additionalPrinterColumns:
- JSONPath: .status.desired
description: The desired number of pods. This is typically equal to the number
of nodes satisfied to run pods.
name: Desired
type: integer
- JSONPath: .status.active
description: The number of actively running pods.
name: Active
type: integer
- JSONPath: .status.succeeded
description: The number of pods which reached phase Succeeded.
name: Succeeded
type: integer
- JSONPath: .status.failed
description: The number of pods which reached phase Failed.
name: Failed
type: integer
- 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.
name: AGE
type: date
group: apps.kruise.io
names:
kind: BroadcastJob
plural: broadcastjobs
shortNames:
- bj
scope: Namespaced
subresources:
status: {}
validation:
openAPIV3Schema:
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/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/api-conventions.md#types-kinds'
type: string
metadata:
type: object
spec:
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
failurePolicy:
description: FailurePolicy indicates the behavior of the job, when failed
pod is found.
properties:
restartLimit:
description: RestartLimit specifies the number of retries before
marking the pod failed.
format: int32
type: integer
type:
description: Type indicates the type of FailurePolicyType.
type: string
type: object
parallelism:
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.
oneOf:
- type: string
- type: integer
paused:
description: Paused will pause the job.
type: boolean
template:
description: Template describes the pod that will be created when executing
a job.
type: object
required:
- template
- completionPolicy
type: object
status:
properties:
active:
description: The number of actively running pods.
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. It is
represented in RFC3339 form and is in UTC.
format: date-time
type: string
conditions:
description: The latest available observations of an object's current
state. +patchMergeKey=type +patchStrategy=merge
items:
properties:
lastProbeTime:
description: Last time the condition was checked.
format: date-time
type: string
lastTransitionTime:
description: Last time the condition transit from one status to
another.
format: date-time
type: string
message:
description: Human readable message indicating details about last
transition.
type: string
reason:
description: (brief) 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 job condition, Complete or Failed.
type: string
required:
- type
- status
type: object
type: array
desired:
description: The desired number of pods, this is typically equal to
the number of nodes satisfied to run pods.
format: int32
type: integer
failed:
description: The number of pods which reached phase Failed.
format: int32
type: integer
phase:
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.
format: date-time
type: string
succeeded:
description: The number of pods which reached phase Succeeded.
format: int32
type: integer
required:
- active
- succeeded
- failed
- desired
- phase
type: object
version: v1alpha1
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []

View File

@ -0,0 +1,287 @@
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
creationTimestamp: null
labels:
controller-tools.k8s.io: "1.0"
name: clonesets.apps.kruise.io
spec:
additionalPrinterColumns:
- JSONPath: .spec.replicas
description: The desired number of pods.
name: DESIRED
type: integer
- JSONPath: .status.updatedReplicas
description: The number of pods updated.
name: UPDATED
type: integer
- JSONPath: .status.updatedReadyReplicas
description: The number of pods updated and ready.
name: UPDATED_READY
type: integer
- JSONPath: .status.readyReplicas
description: The number of pods ready.
name: READY
type: integer
- JSONPath: .status.replicas
description: The number of currently all pods.
name: TOTAL
type: integer
- 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.
name: AGE
type: date
group: apps.kruise.io
names:
kind: CloneSet
plural: clonesets
shortNames:
- clone
scope: Namespaced
subresources:
scale:
labelSelectorPath: .status.labelSelector
specReplicasPath: .spec.replicas
statusReplicasPath: .status.replicas
status: {}
validation:
openAPIV3Schema:
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/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/api-conventions.md#types-kinds'
type: string
metadata:
type: object
spec:
properties:
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.
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.
format: int32
type: integer
scaleStrategy:
description: ScaleStrategy indicates the ScaleStrategy that will be
employed to create and delete Pods in the CloneSet.
properties:
podsToDelete:
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'
type: object
template:
description: Template describes the pods that will be created.
type: object
updateStrategy:
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.
type: object
maxUnavailable:
description: 'The maximum number of pods that can be unavailable
during the update. Value can be an absolute number (ex: 5) or
a percentage of desired pods (ex: 10%). Absolute number is calculated
from percentage by rounding down. Defaults to 20%.'
oneOf:
- type: string
- type: integer
partition:
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.
format: int32
type: integer
paused:
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.
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:
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:
properties:
matchSelector:
description: MatchSelector is used to select by pod's
labels.
type: object
weight:
description: Weight associated with matching the corresponding
matchExpressions, in the range 1-100.
format: int32
type: integer
required:
- weight
- matchSelector
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.
items:
properties:
key:
type: string
value:
type: string
required:
- key
- value
type: object
type: array
type:
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.
items:
type: object
type: array
required:
- replicas
- selector
- template
type: object
status:
properties:
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.
format: int32
type: integer
conditions:
description: Conditions represents the latest available observations
of a CloneSet's current state.
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 CloneSet condition.
type: string
required:
- type
- status
type: object
type: array
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.
format: int64
type: integer
readyReplicas:
description: ReadyReplicas is the number of Pods created by the CloneSet
controller that have a Ready Condition.
format: int32
type: integer
replicas:
description: Replicas is the number of Pods created by the CloneSet
controller.
format: int32
type: integer
updateRevision:
description: UpdateRevision, if not empty, indicates the latest revision
of the CloneSet.
type: string
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.
format: int32
type: integer
updatedReplicas:
description: UpdatedReplicas is the number of Pods created by the CloneSet
controller from the CloneSet version indicated by updateRevision.
format: int32
type: integer
required:
- replicas
- readyReplicas
- updatedReplicas
- updatedReadyReplicas
type: object
version: v1alpha1
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []

View File

@ -0,0 +1,118 @@
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
creationTimestamp: null
labels:
controller-tools.k8s.io: "1.0"
name: sidecarsets.apps.kruise.io
spec:
additionalPrinterColumns:
- JSONPath: .status.matchedPods
description: The number of pods matched.
name: MATCHED
type: integer
- JSONPath: .status.updatedPods
description: The number of pods matched and updated.
name: UPDATED
type: integer
- JSONPath: .status.readyPods
description: The number of pods matched and ready.
name: READY
type: integer
- 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.
name: AGE
type: date
group: apps.kruise.io
names:
kind: SidecarSet
plural: sidecarsets
scope: Cluster
subresources:
status: {}
validation:
openAPIV3Schema:
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/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/api-conventions.md#types-kinds'
type: string
metadata:
type: object
spec:
properties:
containers:
description: Containers is the list of sidecar containers to be injected
into the selected pod
items:
type: object
type: array
paused:
description: Paused indicates that the sidecarset is paused and will
not be processed by the sidecarset controller.
type: boolean
selector:
description: selector is a label query over pods that should be injected
type: object
strategy:
description: The sidecarset strategy to use to replace existing pods
with new ones.
properties:
rollingUpdate:
properties:
maxUnavailable:
oneOf:
- type: string
- type: integer
type: object
type: object
volumes:
description: List of volumes that can be mounted by sidecar containers
items:
type: object
type: array
type: object
status:
properties:
matchedPods:
description: matchedPods is the number of Pods whose labels are matched
with this SidecarSet's selector and are created after sidecarset creates
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.
format: int64
type: integer
readyPods:
description: readyPods is the number of matched Pods that have a ready
condition
format: int32
type: integer
updatedPods:
description: updatedPods is the number of matched Pods that are injected
with the latest SidecarSet's containers
format: int32
type: integer
required:
- matchedPods
- updatedPods
- readyPods
type: object
version: v1alpha1
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []

View File

@ -0,0 +1,279 @@
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
creationTimestamp: null
labels:
controller-tools.k8s.io: "1.0"
name: statefulsets.apps.kruise.io
spec:
additionalPrinterColumns:
- JSONPath: .spec.replicas
description: The desired number of pods.
name: DESIRED
type: integer
- JSONPath: .status.replicas
description: The number of currently all pods.
name: CURRENT
type: integer
- JSONPath: .status.updatedReplicas
description: The number of pods updated.
name: UPDATED
type: integer
- JSONPath: .status.readyReplicas
description: The number of pods ready.
name: READY
type: integer
- 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.
name: AGE
type: date
group: apps.kruise.io
names:
kind: StatefulSet
plural: statefulsets
shortNames:
- sts
scope: Namespaced
subresources:
scale:
labelSelectorPath: .status.labelSelector
specReplicasPath: .spec.replicas
statusReplicasPath: .status.replicas
status: {}
validation:
openAPIV3Schema:
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/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/api-conventions.md#types-kinds'
type: string
metadata:
type: object
spec:
properties:
podManagementPolicy:
description: podManagementPolicy controls how pods are created during
initial scale up, when replacing pods on nodes, or when scaling down.
The default policy is `OrderedReady`, where pods are created in increasing
order (pod-0, then pod-1, etc) and the controller will wait until
each pod is ready before continuing. When scaling down, the pods are
removed in the opposite order. The alternative policy is `Parallel`
which will create pods in parallel to match the desired scale without
waiting, and on scale down will delete all pods at once.
type: string
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, but individual replicas also have a consistent
identity. If unspecified, defaults to 1. TODO: Consider a rename of
this field.'
format: int32
type: integer
revisionHistoryLimit:
description: revisionHistoryLimit is the maximum number of revisions
that will be maintained in the StatefulSet's revision history. The
revision history consists of all revisions not represented by a currently
applied StatefulSetSpec version. The default value is 10.
format: int32
type: integer
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'
type: object
serviceName:
description: 'serviceName is the name of the service that governs this
StatefulSet. This service must exist before the StatefulSet, and is
responsible for the network identity of the set. Pods get DNS/hostnames
that follow the pattern: pod-specific-string.serviceName.default.svc.cluster.local
where "pod-specific-string" is managed by the StatefulSet controller.'
type: string
template:
description: template is the object that describes the pod that will
be created if insufficient replicas are detected. Each pod stamped
out by the StatefulSet will fulfill this Template, but have a unique
identity from the rest of the StatefulSet.
type: object
updateStrategy:
description: updateStrategy indicates the StatefulSetUpdateStrategy
that will be employed to update Pods in the StatefulSet when a revision
is made to Template.
properties:
rollingUpdate:
description: RollingUpdate is used to communicate parameters when
Type is RollingUpdateStatefulSetStrategyType.
properties:
maxUnavailable:
description: 'The maximum number of pods that can be unavailable
during the update. Value can be an absolute number (ex: 5)
or a percentage of desired pods (ex: 10%). Absolute number
is calculated from percentage by rounding down. Also, maxUnavailable
can just be allowed to work with Parallel podManagementPolicy.
Defaults to 1.'
oneOf:
- type: string
- type: integer
partition:
description: '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. - It means controller
will update $(replicas - partition) number of pod. Default
value is 0.'
format: int32
type: integer
paused:
description: Paused indicates that the StatefulSet is paused.
Default value is false
type: boolean
podUpdatePolicy:
description: PodUpdatePolicy indicates how pods should be updated
Default value is "ReCreate"
type: string
unorderedUpdate:
description: UnorderedUpdate contains strategies for non-ordered
update. If it is not nil, pods will be updated with non-ordered
sequence. Noted that UnorderedUpdate can only be allowed to
work with Parallel podManagementPolicy
properties:
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:
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:
properties:
matchSelector:
description: MatchSelector is used to select by
pod's labels.
type: object
weight:
description: Weight associated with matching the
corresponding matchExpressions, in the range
1-100.
format: int32
type: integer
required:
- weight
- matchSelector
type: object
type: array
type: object
type: object
type: object
type:
description: Type indicates the type of the StatefulSetUpdateStrategy.
Default is RollingUpdate.
type: string
type: object
volumeClaimTemplates:
description: 'volumeClaimTemplates is a list of claims that pods are
allowed to reference. The StatefulSet controller is responsible for
mapping network identities to claims in a way that maintains the identity
of a pod. Every claim in this list must have at least one matching
(by name) volumeMount in one container in the template. A claim in
this list takes precedence over any volumes in the template, with
the same name. TODO: Define the behavior if a claim already exists
with the same name.'
items:
type: object
type: array
required:
- selector
- template
type: object
status:
properties:
collisionCount:
description: collisionCount is the count of hash collisions for the
StatefulSet. The StatefulSet controller uses this field as a collision
avoidance mechanism when it needs to create the name for the newest
ControllerRevision.
format: int32
type: integer
conditions:
description: Represents the latest available observations of a statefulset's
current state. +patchMergeKey=type +patchStrategy=merge
items:
type: object
type: array
currentReplicas:
description: currentReplicas is the number of Pods created by the StatefulSet
controller from the StatefulSet version indicated by currentRevision.
format: int32
type: integer
currentRevision:
description: currentRevision, if not empty, indicates the version of
the StatefulSet used to generate Pods in the sequence [0,currentReplicas).
type: string
observedGeneration:
description: observedGeneration is the most recent generation observed
for this StatefulSet. It corresponds to the StatefulSet's generation,
which is updated on mutation by the API Server.
format: int64
type: integer
readyReplicas:
description: readyReplicas is the number of Pods created by the StatefulSet
controller that have a Ready Condition.
format: int32
type: integer
replicas:
description: replicas is the number of Pods created by the StatefulSet
controller.
format: int32
type: integer
updateRevision:
description: updateRevision, if not empty, indicates the version of
the StatefulSet used to generate Pods in the sequence [replicas-updatedReplicas,replicas)
type: string
updatedReplicas:
description: updatedReplicas is the number of Pods created by the StatefulSet
controller from the StatefulSet version indicated by updateRevision.
format: int32
type: integer
required:
- replicas
- readyReplicas
- currentReplicas
- updatedReplicas
type: object
version: v1alpha1
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []

View File

@ -0,0 +1,424 @@
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
creationTimestamp: null
labels:
controller-tools.k8s.io: "1.0"
name: uniteddeployments.apps.kruise.io
spec:
additionalPrinterColumns:
- JSONPath: .spec.replicas
description: The desired number of pods.
name: DESIRED
type: integer
- JSONPath: .status.replicas
description: The number of currently all pods.
name: CURRENT
type: integer
- JSONPath: .status.updatedReplicas
description: The number of pods updated.
name: UPDATED
type: integer
- JSONPath: .status.readyReplicas
description: The number of pods ready.
name: READY
type: integer
- 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.
name: AGE
type: date
group: apps.kruise.io
names:
kind: UnitedDeployment
plural: uniteddeployments
shortNames:
- ud
scope: Namespaced
subresources:
scale:
labelSelectorPath: .status.selector
specReplicasPath: .spec.replicas
statusReplicasPath: .status.replicas
status: {}
validation:
openAPIV3Schema:
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/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/api-conventions.md#types-kinds'
type: string
metadata:
type: object
spec:
properties:
replicas:
description: Replicas is the total desired replicas of all the subsets.
If unspecified, defaults to 1.
format: int32
type: integer
revisionHistoryLimit:
description: Indicates the number of histories to be conserved. If unspecified,
defaults to 10.
format: int32
type: integer
selector:
description: Selector is a label query over pods that should match the
replica count. It must match the pod template's labels.
type: object
template:
description: Template describes the subset that will be created.
properties:
advancedStatefulSetTemplate:
description: AdvancedStatefulSet template
properties:
metadata:
type: object
spec:
properties:
podManagementPolicy:
description: podManagementPolicy controls how pods are created
during initial scale up, when replacing pods on nodes,
or when scaling down. The default policy is `OrderedReady`,
where pods are created in increasing order (pod-0, then
pod-1, etc) and the controller will wait until each pod
is ready before continuing. When scaling down, the pods
are removed in the opposite order. The alternative policy
is `Parallel` which will create pods in parallel to match
the desired scale without waiting, and on scale down will
delete all pods at once.
type: string
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, but
individual replicas also have a consistent identity. If
unspecified, defaults to 1. TODO: Consider a rename of
this field.'
format: int32
type: integer
revisionHistoryLimit:
description: revisionHistoryLimit is the maximum number
of revisions that will be maintained in the StatefulSet's
revision history. The revision history consists of all
revisions not represented by a currently applied StatefulSetSpec
version. The default value is 10.
format: int32
type: integer
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'
type: object
serviceName:
description: 'serviceName is the name of the service that
governs this StatefulSet. This service must exist before
the StatefulSet, and is responsible for the network identity
of the set. Pods get DNS/hostnames that follow the pattern:
pod-specific-string.serviceName.default.svc.cluster.local
where "pod-specific-string" is managed by the StatefulSet
controller.'
type: string
template:
description: template is the object that describes the pod
that will be created if insufficient replicas are detected.
Each pod stamped out by the StatefulSet will fulfill this
Template, but have a unique identity from the rest of
the StatefulSet.
type: object
updateStrategy:
description: updateStrategy indicates the StatefulSetUpdateStrategy
that will be employed to update Pods in the StatefulSet
when a revision is made to Template.
properties:
rollingUpdate:
description: RollingUpdate is used to communicate parameters
when Type is RollingUpdateStatefulSetStrategyType.
properties:
maxUnavailable:
description: 'The maximum number of pods that can
be unavailable during the update. Value can be
an absolute number (ex: 5) or a percentage of
desired pods (ex: 10%). Absolute number is calculated
from percentage by rounding down. Also, maxUnavailable
can just be allowed to work with Parallel podManagementPolicy.
Defaults to 1.'
oneOf:
- type: string
- type: integer
partition:
description: '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. - It means controller
will update $(replicas - partition) number of
pod. Default value is 0.'
format: int32
type: integer
paused:
description: Paused indicates that the StatefulSet
is paused. Default value is false
type: boolean
podUpdatePolicy:
description: PodUpdatePolicy indicates how pods
should be updated Default value is "ReCreate"
type: string
unorderedUpdate:
description: UnorderedUpdate contains strategies
for non-ordered update. If it is not nil, pods
will be updated with non-ordered sequence. Noted
that UnorderedUpdate can only be allowed to work
with Parallel podManagementPolicy
properties:
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:
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:
properties:
matchSelector:
description: MatchSelector is used
to select by pod's labels.
type: object
weight:
description: Weight associated with
matching the corresponding matchExpressions,
in the range 1-100.
format: int32
type: integer
required:
- weight
- matchSelector
type: object
type: array
type: object
type: object
type: object
type:
description: Type indicates the type of the StatefulSetUpdateStrategy.
Default is RollingUpdate.
type: string
type: object
volumeClaimTemplates:
description: 'volumeClaimTemplates is a list of claims that
pods are allowed to reference. The StatefulSet controller
is responsible for mapping network identities to claims
in a way that maintains the identity of a pod. Every claim
in this list must have at least one matching (by name)
volumeMount in one container in the template. A claim
in this list takes precedence over any volumes in the
template, with the same name. TODO: Define the behavior
if a claim already exists with the same name.'
items:
type: object
type: array
required:
- selector
- template
type: object
required:
- spec
type: object
statefulSetTemplate:
description: StatefulSet template
properties:
metadata:
type: object
spec:
type: object
required:
- spec
type: object
type: object
topology:
description: Topology describes the pods distribution detail between
each of subsets.
properties:
subsets:
description: Contains the details of each subset. Each element in
this array represents one subset which will be provisioned and
managed by UnitedDeployment.
items:
properties:
name:
description: Indicates subset name as a DNS_LABEL, which will
be used to generate subset workload name prefix in the format
'<deployment-name>-<subset-name>-'. Name should be unique
between all of the subsets under one UnitedDeployment.
type: string
nodeSelectorTerm:
description: Indicates the node selector to form the subset.
Depending on the node selector, pods provisioned could be
distributed across multiple groups of nodes. A subset's
nodeSelectorTerm is not allowed to be updated.
type: object
replicas:
description: Indicates the number of the pod to be created
under this subset. Replicas could also be 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.
oneOf:
- type: string
- type: integer
tolerations:
description: Indicates the tolerations the pods under this
subset have. A subset's tolerations is not allowed to be
updated.
items:
type: object
type: array
required:
- name
type: object
type: array
type: object
updateStrategy:
description: UpdateStrategy indicates the strategy the UnitedDeployment
use to preform the update, when template is changed.
properties:
manualUpdate:
description: Includes all of the parameters a Manual update strategy
needs.
properties:
partitions:
description: Indicates number of subset partition.
type: object
type: object
type:
description: Type of UnitedDeployment update strategy. Default is
Manual.
type: string
type: object
required:
- selector
type: object
status:
properties:
collisionCount:
description: Count of hash collisions for the UnitedDeployment. The
UnitedDeployment 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:
description: Represents the latest available observations of a UnitedDeployment's
current state.
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
type: object
type: array
currentRevision:
description: CurrentRevision, if not empty, indicates the current version
of the UnitedDeployment.
type: string
observedGeneration:
description: ObservedGeneration is the most recent generation observed
for this UnitedDeployment. It corresponds to the UnitedDeployment's
generation, which is updated on mutation by the API Server.
format: int64
type: integer
readyReplicas:
description: The number of ready replicas.
format: int32
type: integer
replicas:
description: Replicas is the most recently observed number of replicas.
format: int32
type: integer
subsetReplicas:
description: Records the topology detail information of the replicas
of each subset.
type: object
updateStatus:
description: Records the information of update progress.
properties:
currentPartitions:
description: Records the current partition.
type: object
updatedRevision:
description: Records the latest revision.
type: string
type: object
updatedReadyReplicas:
description: The number of ready current revision replicas for this
UnitedDeployment.
format: int32
type: integer
updatedReplicas:
description: The number of pods in current version.
format: int32
type: integer
required:
- replicas
- updatedReplicas
- currentRevision
type: object
version: v1alpha1
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []

View File

@ -0,0 +1,111 @@
apiVersion: v1
kind: Namespace
metadata:
labels:
control-plane: controller-manager
controller-tools.k8s.io: "1.0"
name: kruise-system
---
apiVersion: v1
kind: Service
metadata:
labels:
control-plane: controller-manager
controller-tools.k8s.io: "1.0"
name: kruise-controller-manager-service
namespace: kruise-system
spec:
ports:
- port: 443
selector:
control-plane: controller-manager
controller-tools.k8s.io: "1.0"
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
labels:
control-plane: controller-manager
controller-tools.k8s.io: "1.0"
name: kruise-controller-manager
namespace: kruise-system
spec:
replicas: 1
serviceName: kruise-controller-manager-service
revisionHistoryLimit: {{ .Values.revisionHistoryLimit }}
selector:
matchLabels:
control-plane: controller-manager
controller-tools.k8s.io: "1.0"
template:
metadata:
annotations:
prometheus.io/scrape: "true"
labels:
control-plane: controller-manager
controller-tools.k8s.io: "1.0"
spec:
containers:
- command:
- /manager
args:
- "--metrics-addr={{ .Values.manager.metrics.addr }}:{{ .Values.manager.metrics.port }}"
- "--logtostderr=true"
- "--v={{ .Values.manager.log.level }}"
env:
- name: POD_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: SECRET_NAME
value: kruise-webhook-server-secret
image: openkruise/kruise-manager:v0.4.0
imagePullPolicy: IfNotPresent
name: manager
ports:
- containerPort: {{ .Values.manager.metrics.port }}
name: metrics
protocol: TCP
- containerPort: 9876
name: webhook-server
protocol: TCP
readinessProbe:
tcpSocket:
port: 9876
resources:
{{- toYaml .Values.manager.resources | nindent 12 }}
volumeMounts:
- mountPath: /tmp/cert
name: cert
readOnly: true
terminationGracePeriodSeconds: 10
{{- if .Values.spec.nodeAffinity }}
affinity:
{{- end }}
{{- with .Values.spec.nodeAffinity }}
nodeAffinity:
{{ toYaml . | indent 10 }}
{{- end }}
{{- if .Values.spec.nodeSelector }}
nodeSelector:
{{ toYaml .Values.spec.nodeSelector | indent 8 }}
{{- end }}
{{- if .Values.spec.tolerations }}
tolerations:
{{ toYaml .Values.spec.tolerations | indent 8 }}
{{- end }}
volumes:
- name: cert
secret:
defaultMode: 420
secretName: kruise-webhook-server-secret
---
apiVersion: v1
kind: Secret
metadata:
name: kruise-webhook-server-secret
namespace: kruise-system

View File

@ -0,0 +1,335 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
creationTimestamp: null
name: kruise-manager-role
rules:
- apiGroups:
- ""
resources:
- pods
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- ""
resources:
- nodes
verbs:
- get
- list
- watch
- apiGroups:
- ""
resources:
- pods/status
verbs:
- get
- update
- patch
- apiGroups:
- apps.kruise.io
resources:
- broadcastjobs
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- apps.kruise.io
resources:
- broadcastjobs/status
verbs:
- get
- update
- patch
- apiGroups:
- ""
resources:
- pods
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- ""
resources:
- pods/status
verbs:
- get
- update
- patch
- apiGroups:
- ""
resources:
- events
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- ""
resources:
- persistentvolumeclaims
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- apps
resources:
- controllerrevisions
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- apps.kruise.io
resources:
- clonesets
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- apps.kruise.io
resources:
- clonesets/status
verbs:
- get
- update
- patch
- apiGroups:
- ""
resources:
- configmaps
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- apps.kruise.io
resources:
- sidecarsets
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- apps.kruise.io
resources:
- sidecarsets/status
verbs:
- get
- update
- patch
- apiGroups:
- ""
resources:
- pods
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- ""
resources:
- pods/status
verbs:
- get
- update
- patch
- apiGroups:
- ""
resources:
- events
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- ""
resources:
- persistentvolumeclaims
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- apps
resources:
- controllerrevisions
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- apps.kruise.io
resources:
- statefulsets
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- apps.kruise.io
resources:
- statefulsets/status
verbs:
- get
- update
- patch
- apiGroups:
- apps.kruise.io
resources:
- uniteddeployments
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- apps.kruise.io
resources:
- uniteddeployments/status
verbs:
- get
- update
- patch
- apiGroups:
- apps
resources:
- statefulsets
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- apps
resources:
- statefulsets/status
verbs:
- get
- update
- patch
- apiGroups:
- apps.kruise.io
resources:
- statefulsets
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- apps.kruise.io
resources:
- statefulsets/status
verbs:
- get
- update
- patch
- apiGroups:
- admissionregistration.k8s.io
resources:
- mutatingwebhookconfigurations
- validatingwebhookconfigurations
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- ""
resources:
- secrets
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- ""
resources:
- services
verbs:
- get
- list
- watch
- create
- update
- patch
- delete

View File

@ -0,0 +1,13 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
creationTimestamp: null
name: kruise-manager-rolebinding
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: kruise-manager-role
subjects:
- kind: ServiceAccount
name: default
namespace: kruise-system

View File

@ -0,0 +1,120 @@
apiVersion: admissionregistration.k8s.io/v1beta1
kind: MutatingWebhookConfiguration
metadata:
name: kruise-mutating-webhook-configuration
---
apiVersion: admissionregistration.k8s.io/v1beta1
kind: ValidatingWebhookConfiguration
metadata:
name: kruise-validating-webhook-configuration
webhooks:
- clientConfig:
caBundle: fake
service:
name: webhook-server-service
namespace: kruise-system
path: /validating-create-update-broadcastjob
failurePolicy: Fail
name: validating-create-update-broadcastjob.kruise.io
namespaceSelector:
matchExpressions:
- key: control-plane
operator: DoesNotExist
rules:
- apiGroups:
- apps.kruise.io
apiVersions:
- v1alpha1
operations:
- CREATE
- UPDATE
resources:
- broadcastjobs
- clientConfig:
caBundle: fake
service:
name: webhook-server-service
namespace: kruise-system
path: /validating-create-update-cloneset
failurePolicy: Fail
name: validating-create-update-cloneset.kruise.io
namespaceSelector:
matchExpressions:
- key: control-plane
operator: DoesNotExist
rules:
- apiGroups:
- apps.kruise.io
apiVersions:
- v1alpha1
operations:
- CREATE
- UPDATE
resources:
- clonesets
- clientConfig:
caBundle: fake
service:
name: webhook-server-service
namespace: kruise-system
path: /validating-create-update-sidecarset
failurePolicy: Fail
name: validating-create-update-sidecarset.kruise.io
namespaceSelector:
matchExpressions:
- key: control-plane
operator: DoesNotExist
rules:
- apiGroups:
- apps.kruise.io
apiVersions:
- v1alpha1
operations:
- CREATE
- UPDATE
resources:
- sidecarsets
- clientConfig:
caBundle: fake
service:
name: webhook-server-service
namespace: kruise-system
path: /validating-create-update-statefulset
failurePolicy: Fail
name: validating-create-update-statefulset.kruise.io
namespaceSelector:
matchExpressions:
- key: control-plane
operator: DoesNotExist
rules:
- apiGroups:
- apps.kruise.io
apiVersions:
- v1alpha1
operations:
- CREATE
- UPDATE
resources:
- statefulsets
- clientConfig:
caBundle: fake
service:
name: webhook-server-service
namespace: kruise-system
path: /validating-create-update-uniteddeployment
failurePolicy: Fail
name: validating-create-update-uniteddeployment.kruise.io
namespaceSelector:
matchExpressions:
- key: control-plane
operator: DoesNotExist
rules:
- apiGroups:
- apps.kruise.io
apiVersions:
- v1alpha1
operations:
- CREATE
- UPDATE
resources:
- uniteddeployments

View File

@ -0,0 +1,27 @@
# Default values for kruise.
revisionHistoryLimit: 3
spec:
nodeAffinity: {}
nodeSelector: {}
tolerations: []
manager:
# settings for log print
log:
# log level for kruise-manager
level: "4"
# resources of kruise-manager container
resources:
limits:
cpu: 100m
memory: 256Mi
requests:
cpu: 100m
memory: 256Mi
metrics:
addr: localhost
port: 8080

View File

@ -0,0 +1,17 @@
apiVersion: v1
name: kruise
description: Helm chart for all kruise-manager components
version: 0.4.1
appVersion: 0.4.1
icon: http://openkruise.io/img/kruise_white.png
keywords:
- kubernetes
- kruise
- workload
- statefulset
- sidecar
- job
- deployment
home: https://openkruise.io
sources:
- https://github.com/openkruise/kruise

View File

@ -0,0 +1,50 @@
# Kruise
## Install
```bash
helm install kruise https://github.com/openkruise/kruise/releases/download/v0.4.1/kruise-chart.tgz
```
you will see follow:
```
NAME: kruise
LAST DEPLOYED: Mon Jan 6 14:47:48 2020
NAMESPACE: default
STATUS: deployed
REVISION: 1
TEST SUITE: None
```
## Uninstall
```bash
$ helm delete kruise
release "kruise" uninstalled
```
## Configuration
The following table lists the configurable parameters of the kruise chart and their default values.
| Parameter | Description | Default |
|-------------------------------------------|--------------------------------------------------------------------|-------------------------------------|
| `log.level` | Log level that kruise-manager printed | `4` |
| `revisionHistoryLimit` | Limit of revision history | `3` |
| `manager.resources.limits.cpu` | CPU resource limit of kruise-manager container | `100m` |
| `manager.resources.limits.memory` | Memory resource limit of kruise-manager container | `256Mi` |
| `manager.resources.requests.cpu` | CPU resource request of kruise-manager container | `100m` |
| `manager.resources.requests.memory` | Memory resource request of kruise-manager container | `256Mi` |
| `manager.metrics.addr` | Addr of metrics served | `localhost` |
| `manager.metrics.port` | Port of metrics served | `8080` |
| `manager.custom_resource_enable` | Custom resources enabled by kruise-manager | `""(empty means all enabled)` |
| `spec.nodeAffinity` | Node affinity policy for kruise-manager pod | `{}` |
| `spec.nodeSelector` | Node labels for kruise-manager pod | `{}` |
| `spec.tolerations` | Tolerations for kruise-manager pod | `[]`
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,
```bash
# helm install kruise https://github.com/openkruise/kruise/releases/download/v0.4.1/kruise-chart.tgz --set manager.log.level=5,manager.custom_resource_enable="StatefulSet\,SidecarSet"
```

View File

@ -0,0 +1,201 @@
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
creationTimestamp: null
labels:
controller-tools.k8s.io: "1.0"
name: broadcastjobs.apps.kruise.io
spec:
additionalPrinterColumns:
- JSONPath: .status.desired
description: The desired number of pods. This is typically equal to the number
of nodes satisfied to run pods.
name: Desired
type: integer
- JSONPath: .status.active
description: The number of actively running pods.
name: Active
type: integer
- JSONPath: .status.succeeded
description: The number of pods which reached phase Succeeded.
name: Succeeded
type: integer
- JSONPath: .status.failed
description: The number of pods which reached phase Failed.
name: Failed
type: integer
- 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.
name: AGE
type: date
group: apps.kruise.io
names:
kind: BroadcastJob
plural: broadcastjobs
shortNames:
- bj
scope: Namespaced
subresources:
status: {}
validation:
openAPIV3Schema:
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/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/api-conventions.md#types-kinds'
type: string
metadata:
type: object
spec:
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
failurePolicy:
description: FailurePolicy indicates the behavior of the job, when failed
pod is found.
properties:
restartLimit:
description: RestartLimit specifies the number of retries before
marking the pod failed.
format: int32
type: integer
type:
description: Type indicates the type of FailurePolicyType.
type: string
type: object
parallelism:
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.
oneOf:
- type: string
- type: integer
paused:
description: Paused will pause the job.
type: boolean
template:
description: Template describes the pod that will be created when executing
a job.
type: object
required:
- template
- completionPolicy
type: object
status:
properties:
active:
description: The number of actively running pods.
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. It is
represented in RFC3339 form and is in UTC.
format: date-time
type: string
conditions:
description: The latest available observations of an object's current
state. +patchMergeKey=type +patchStrategy=merge
items:
properties:
lastProbeTime:
description: Last time the condition was checked.
format: date-time
type: string
lastTransitionTime:
description: Last time the condition transit from one status to
another.
format: date-time
type: string
message:
description: Human readable message indicating details about last
transition.
type: string
reason:
description: (brief) 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 job condition, Complete or Failed.
type: string
required:
- type
- status
type: object
type: array
desired:
description: The desired number of pods, this is typically equal to
the number of nodes satisfied to run pods.
format: int32
type: integer
failed:
description: The number of pods which reached phase Failed.
format: int32
type: integer
phase:
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.
format: date-time
type: string
succeeded:
description: The number of pods which reached phase Succeeded.
format: int32
type: integer
required:
- active
- succeeded
- failed
- desired
- phase
type: object
version: v1alpha1
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []

View File

@ -0,0 +1,311 @@
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
creationTimestamp: null
labels:
controller-tools.k8s.io: "1.0"
name: clonesets.apps.kruise.io
spec:
additionalPrinterColumns:
- JSONPath: .spec.replicas
description: The desired number of pods.
name: DESIRED
type: integer
- JSONPath: .status.updatedReplicas
description: The number of pods updated.
name: UPDATED
type: integer
- JSONPath: .status.updatedReadyReplicas
description: The number of pods updated and ready.
name: UPDATED_READY
type: integer
- JSONPath: .status.readyReplicas
description: The number of pods ready.
name: READY
type: integer
- JSONPath: .status.replicas
description: The number of currently all pods.
name: TOTAL
type: integer
- 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.
name: AGE
type: date
group: apps.kruise.io
names:
kind: CloneSet
plural: clonesets
shortNames:
- clone
scope: Namespaced
subresources:
scale:
labelSelectorPath: .status.labelSelector
specReplicasPath: .spec.replicas
statusReplicasPath: .status.replicas
status: {}
validation:
openAPIV3Schema:
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/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/api-conventions.md#types-kinds'
type: string
metadata:
type: object
spec:
properties:
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)
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.
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.
format: int32
type: integer
scaleStrategy:
description: ScaleStrategy indicates the ScaleStrategy that will be
employed to create and delete Pods in the CloneSet.
properties:
podsToDelete:
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'
type: object
template:
description: Template describes the pods that will be created.
type: object
updateStrategy:
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.
format: int32
type: integer
type: object
maxUnavailable:
description: 'The maximum number of pods that can be unavailable
during the update. Value can be an absolute number (ex: 5) or
a percentage of desired pods (ex: 10%). Absolute number is calculated
from percentage by rounding down. Defaults to 20%.'
oneOf:
- type: string
- type: integer
partition:
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.
format: int32
type: integer
paused:
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.
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:
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:
properties:
matchSelector:
description: MatchSelector is used to select by pod's
labels.
type: object
weight:
description: Weight associated with matching the corresponding
matchExpressions, in the range 1-100.
format: int32
type: integer
required:
- weight
- matchSelector
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.
items:
properties:
key:
type: string
value:
type: string
required:
- key
- value
type: object
type: array
type:
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.
items:
type: object
type: array
required:
- replicas
- selector
- template
type: object
status:
properties:
availableReplicas:
description: AvailableReplicas is the number of Pods created by the
CloneSet controller that have a Ready Condition for at least minReadySeconds.
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.
format: int32
type: integer
conditions:
description: Conditions represents the latest available observations
of a CloneSet's current state.
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 CloneSet condition.
type: string
required:
- type
- status
type: object
type: array
labelSelector:
description: LabelSelector is label selectors for query over pods 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.
format: int64
type: integer
readyReplicas:
description: ReadyReplicas is the number of Pods created by the CloneSet
controller that have a Ready Condition.
format: int32
type: integer
replicas:
description: Replicas is the number of Pods created by the CloneSet
controller.
format: int32
type: integer
updateRevision:
description: UpdateRevision, if not empty, indicates the latest revision
of the CloneSet.
type: string
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.
format: int32
type: integer
updatedReplicas:
description: UpdatedReplicas is the number of Pods created by the CloneSet
controller from the CloneSet version indicated by updateRevision.
format: int32
type: integer
required:
- replicas
- readyReplicas
- availableReplicas
- updatedReplicas
- updatedReadyReplicas
type: object
version: v1alpha1
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []

View File

@ -0,0 +1,118 @@
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
creationTimestamp: null
labels:
controller-tools.k8s.io: "1.0"
name: sidecarsets.apps.kruise.io
spec:
additionalPrinterColumns:
- JSONPath: .status.matchedPods
description: The number of pods matched.
name: MATCHED
type: integer
- JSONPath: .status.updatedPods
description: The number of pods matched and updated.
name: UPDATED
type: integer
- JSONPath: .status.readyPods
description: The number of pods matched and ready.
name: READY
type: integer
- 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.
name: AGE
type: date
group: apps.kruise.io
names:
kind: SidecarSet
plural: sidecarsets
scope: Cluster
subresources:
status: {}
validation:
openAPIV3Schema:
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/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/api-conventions.md#types-kinds'
type: string
metadata:
type: object
spec:
properties:
containers:
description: Containers is the list of sidecar containers to be injected
into the selected pod
items:
type: object
type: array
paused:
description: Paused indicates that the sidecarset is paused and will
not be processed by the sidecarset controller.
type: boolean
selector:
description: selector is a label query over pods that should be injected
type: object
strategy:
description: The sidecarset strategy to use to replace existing pods
with new ones.
properties:
rollingUpdate:
properties:
maxUnavailable:
oneOf:
- type: string
- type: integer
type: object
type: object
volumes:
description: List of volumes that can be mounted by sidecar containers
items:
type: object
type: array
type: object
status:
properties:
matchedPods:
description: matchedPods is the number of Pods whose labels are matched
with this SidecarSet's selector and are created after sidecarset creates
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.
format: int64
type: integer
readyPods:
description: readyPods is the number of matched Pods that have a ready
condition
format: int32
type: integer
updatedPods:
description: updatedPods is the number of matched Pods that are injected
with the latest SidecarSet's containers
format: int32
type: integer
required:
- matchedPods
- updatedPods
- readyPods
type: object
version: v1alpha1
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []

View File

@ -0,0 +1,294 @@
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
creationTimestamp: null
labels:
controller-tools.k8s.io: "1.0"
name: statefulsets.apps.kruise.io
spec:
additionalPrinterColumns:
- JSONPath: .spec.replicas
description: The desired number of pods.
name: DESIRED
type: integer
- JSONPath: .status.replicas
description: The number of currently all pods.
name: CURRENT
type: integer
- JSONPath: .status.updatedReplicas
description: The number of pods updated.
name: UPDATED
type: integer
- JSONPath: .status.readyReplicas
description: The number of pods ready.
name: READY
type: integer
- 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.
name: AGE
type: date
group: apps.kruise.io
names:
kind: StatefulSet
plural: statefulsets
shortNames:
- sts
scope: Namespaced
subresources:
scale:
labelSelectorPath: .status.labelSelector
specReplicasPath: .spec.replicas
statusReplicasPath: .status.replicas
status: {}
validation:
openAPIV3Schema:
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/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/api-conventions.md#types-kinds'
type: string
metadata:
type: object
spec:
properties:
podManagementPolicy:
description: podManagementPolicy controls how pods are created during
initial scale up, when replacing pods on nodes, or when scaling down.
The default policy is `OrderedReady`, where pods are created in increasing
order (pod-0, then pod-1, etc) and the controller will wait until
each pod is ready before continuing. When scaling down, the pods are
removed in the opposite order. The alternative policy is `Parallel`
which will create pods in parallel to match the desired scale without
waiting, and on scale down will delete all pods at once.
type: string
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, but individual replicas also have a consistent
identity. If unspecified, defaults to 1. TODO: Consider a rename of
this field.'
format: int32
type: integer
revisionHistoryLimit:
description: revisionHistoryLimit is the maximum number of revisions
that will be maintained in the StatefulSet's revision history. The
revision history consists of all revisions not represented by a currently
applied StatefulSetSpec version. The default value is 10.
format: int32
type: integer
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'
type: object
serviceName:
description: 'serviceName is the name of the service that governs this
StatefulSet. This service must exist before the StatefulSet, and is
responsible for the network identity of the set. Pods get DNS/hostnames
that follow the pattern: pod-specific-string.serviceName.default.svc.cluster.local
where "pod-specific-string" is managed by the StatefulSet controller.'
type: string
template:
description: template is the object that describes the pod that will
be created if insufficient replicas are detected. Each pod stamped
out by the StatefulSet will fulfill this Template, but have a unique
identity from the rest of the StatefulSet.
type: object
updateStrategy:
description: updateStrategy indicates the StatefulSetUpdateStrategy
that will be employed to update Pods in the StatefulSet when a revision
is made to Template.
properties:
rollingUpdate:
description: RollingUpdate is used to communicate parameters when
Type is RollingUpdateStatefulSetStrategyType.
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.
format: int32
type: integer
type: object
maxUnavailable:
description: 'The maximum number of pods that can be unavailable
during the update. Value can be an absolute number (ex: 5)
or a percentage of desired pods (ex: 10%). Absolute number
is calculated from percentage by rounding down. Also, maxUnavailable
can just be allowed to work with Parallel podManagementPolicy.
Defaults to 1.'
oneOf:
- type: string
- type: integer
partition:
description: '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. - It means controller
will update $(replicas - partition) number of pod. Default
value is 0.'
format: int32
type: integer
paused:
description: Paused indicates that the StatefulSet is paused.
Default value is false
type: boolean
podUpdatePolicy:
description: PodUpdatePolicy indicates how pods should be updated
Default value is "ReCreate"
type: string
unorderedUpdate:
description: UnorderedUpdate contains strategies for non-ordered
update. If it is not nil, pods will be updated with non-ordered
sequence. Noted that UnorderedUpdate can only be allowed to
work with Parallel podManagementPolicy
properties:
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:
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:
properties:
matchSelector:
description: MatchSelector is used to select by
pod's labels.
type: object
weight:
description: Weight associated with matching the
corresponding matchExpressions, in the range
1-100.
format: int32
type: integer
required:
- weight
- matchSelector
type: object
type: array
type: object
type: object
type: object
type:
description: Type indicates the type of the StatefulSetUpdateStrategy.
Default is RollingUpdate.
type: string
type: object
volumeClaimTemplates:
description: 'volumeClaimTemplates is a list of claims that pods are
allowed to reference. The StatefulSet controller is responsible for
mapping network identities to claims in a way that maintains the identity
of a pod. Every claim in this list must have at least one matching
(by name) volumeMount in one container in the template. A claim in
this list takes precedence over any volumes in the template, with
the same name. TODO: Define the behavior if a claim already exists
with the same name.'
items:
type: object
type: array
required:
- selector
- template
type: object
status:
properties:
collisionCount:
description: collisionCount is the count of hash collisions for the
StatefulSet. The StatefulSet controller uses this field as a collision
avoidance mechanism when it needs to create the name for the newest
ControllerRevision.
format: int32
type: integer
conditions:
description: Represents the latest available observations of a statefulset's
current state. +patchMergeKey=type +patchStrategy=merge
items:
type: object
type: array
currentReplicas:
description: currentReplicas is the number of Pods created by the StatefulSet
controller from the StatefulSet version indicated by currentRevision.
format: int32
type: integer
currentRevision:
description: currentRevision, if not empty, indicates the version of
the StatefulSet used to generate Pods in the sequence [0,currentReplicas).
type: string
labelSelector:
description: LabelSelector is label selectors for query over pods that
should match the replica count used by HPA.
type: string
observedGeneration:
description: observedGeneration is the most recent generation observed
for this StatefulSet. It corresponds to the StatefulSet's generation,
which is updated on mutation by the API Server.
format: int64
type: integer
readyReplicas:
description: readyReplicas is the number of Pods created by the StatefulSet
controller that have a Ready Condition.
format: int32
type: integer
replicas:
description: replicas is the number of Pods created by the StatefulSet
controller.
format: int32
type: integer
updateRevision:
description: updateRevision, if not empty, indicates the version of
the StatefulSet used to generate Pods in the sequence [replicas-updatedReplicas,replicas)
type: string
updatedReplicas:
description: updatedReplicas is the number of Pods created by the StatefulSet
controller from the StatefulSet version indicated by updateRevision.
format: int32
type: integer
required:
- replicas
- readyReplicas
- currentReplicas
- updatedReplicas
type: object
version: v1alpha1
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []

View File

@ -0,0 +1,436 @@
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
creationTimestamp: null
labels:
controller-tools.k8s.io: "1.0"
name: uniteddeployments.apps.kruise.io
spec:
additionalPrinterColumns:
- JSONPath: .spec.replicas
description: The desired number of pods.
name: DESIRED
type: integer
- JSONPath: .status.replicas
description: The number of currently all pods.
name: CURRENT
type: integer
- JSONPath: .status.updatedReplicas
description: The number of pods updated.
name: UPDATED
type: integer
- JSONPath: .status.readyReplicas
description: The number of pods ready.
name: READY
type: integer
- 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.
name: AGE
type: date
group: apps.kruise.io
names:
kind: UnitedDeployment
plural: uniteddeployments
shortNames:
- ud
scope: Namespaced
subresources:
scale:
labelSelectorPath: .status.selector
specReplicasPath: .spec.replicas
statusReplicasPath: .status.replicas
status: {}
validation:
openAPIV3Schema:
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/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/api-conventions.md#types-kinds'
type: string
metadata:
type: object
spec:
properties:
replicas:
description: Replicas is the total desired replicas of all the subsets.
If unspecified, defaults to 1.
format: int32
type: integer
revisionHistoryLimit:
description: Indicates the number of histories to be conserved. If unspecified,
defaults to 10.
format: int32
type: integer
selector:
description: Selector is a label query over pods that should match the
replica count. It must match the pod template's labels.
type: object
template:
description: Template describes the subset that will be created.
properties:
advancedStatefulSetTemplate:
description: AdvancedStatefulSet template
properties:
metadata:
type: object
spec:
properties:
podManagementPolicy:
description: podManagementPolicy controls how pods are created
during initial scale up, when replacing pods on nodes,
or when scaling down. The default policy is `OrderedReady`,
where pods are created in increasing order (pod-0, then
pod-1, etc) and the controller will wait until each pod
is ready before continuing. When scaling down, the pods
are removed in the opposite order. The alternative policy
is `Parallel` which will create pods in parallel to match
the desired scale without waiting, and on scale down will
delete all pods at once.
type: string
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, but
individual replicas also have a consistent identity. If
unspecified, defaults to 1. TODO: Consider a rename of
this field.'
format: int32
type: integer
revisionHistoryLimit:
description: revisionHistoryLimit is the maximum number
of revisions that will be maintained in the StatefulSet's
revision history. The revision history consists of all
revisions not represented by a currently applied StatefulSetSpec
version. The default value is 10.
format: int32
type: integer
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'
type: object
serviceName:
description: 'serviceName is the name of the service that
governs this StatefulSet. This service must exist before
the StatefulSet, and is responsible for the network identity
of the set. Pods get DNS/hostnames that follow the pattern:
pod-specific-string.serviceName.default.svc.cluster.local
where "pod-specific-string" is managed by the StatefulSet
controller.'
type: string
template:
description: template is the object that describes the pod
that will be created if insufficient replicas are detected.
Each pod stamped out by the StatefulSet will fulfill this
Template, but have a unique identity from the rest of
the StatefulSet.
type: object
updateStrategy:
description: updateStrategy indicates the StatefulSetUpdateStrategy
that will be employed to update Pods in the StatefulSet
when a revision is made to Template.
properties:
rollingUpdate:
description: RollingUpdate is used to communicate parameters
when Type is RollingUpdateStatefulSetStrategyType.
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.
format: int32
type: integer
type: object
maxUnavailable:
description: 'The maximum number of pods that can
be unavailable during the update. Value can be
an absolute number (ex: 5) or a percentage of
desired pods (ex: 10%). Absolute number is calculated
from percentage by rounding down. Also, maxUnavailable
can just be allowed to work with Parallel podManagementPolicy.
Defaults to 1.'
oneOf:
- type: string
- type: integer
partition:
description: '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. - It means controller
will update $(replicas - partition) number of
pod. Default value is 0.'
format: int32
type: integer
paused:
description: Paused indicates that the StatefulSet
is paused. Default value is false
type: boolean
podUpdatePolicy:
description: PodUpdatePolicy indicates how pods
should be updated Default value is "ReCreate"
type: string
unorderedUpdate:
description: UnorderedUpdate contains strategies
for non-ordered update. If it is not nil, pods
will be updated with non-ordered sequence. Noted
that UnorderedUpdate can only be allowed to work
with Parallel podManagementPolicy
properties:
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:
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:
properties:
matchSelector:
description: MatchSelector is used
to select by pod's labels.
type: object
weight:
description: Weight associated with
matching the corresponding matchExpressions,
in the range 1-100.
format: int32
type: integer
required:
- weight
- matchSelector
type: object
type: array
type: object
type: object
type: object
type:
description: Type indicates the type of the StatefulSetUpdateStrategy.
Default is RollingUpdate.
type: string
type: object
volumeClaimTemplates:
description: 'volumeClaimTemplates is a list of claims that
pods are allowed to reference. The StatefulSet controller
is responsible for mapping network identities to claims
in a way that maintains the identity of a pod. Every claim
in this list must have at least one matching (by name)
volumeMount in one container in the template. A claim
in this list takes precedence over any volumes in the
template, with the same name. TODO: Define the behavior
if a claim already exists with the same name.'
items:
type: object
type: array
required:
- selector
- template
type: object
required:
- spec
type: object
statefulSetTemplate:
description: StatefulSet template
properties:
metadata:
type: object
spec:
type: object
required:
- spec
type: object
type: object
topology:
description: Topology describes the pods distribution detail between
each of subsets.
properties:
subsets:
description: Contains the details of each subset. Each element in
this array represents one subset which will be provisioned and
managed by UnitedDeployment.
items:
properties:
name:
description: Indicates subset name as a DNS_LABEL, which will
be used to generate subset workload name prefix in the format
'<deployment-name>-<subset-name>-'. Name should be unique
between all of the subsets under one UnitedDeployment.
type: string
nodeSelectorTerm:
description: Indicates the node selector to form the subset.
Depending on the node selector, pods provisioned could be
distributed across multiple groups of nodes. A subset's
nodeSelectorTerm is not allowed to be updated.
type: object
replicas:
description: Indicates the number of the pod to be created
under this subset. Replicas could also be 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.
oneOf:
- type: string
- type: integer
tolerations:
description: Indicates the tolerations the pods under this
subset have. A subset's tolerations is not allowed to be
updated.
items:
type: object
type: array
required:
- name
type: object
type: array
type: object
updateStrategy:
description: UpdateStrategy indicates the strategy the UnitedDeployment
use to preform the update, when template is changed.
properties:
manualUpdate:
description: Includes all of the parameters a Manual update strategy
needs.
properties:
partitions:
description: Indicates number of subset partition.
type: object
type: object
type:
description: Type of UnitedDeployment update strategy. Default is
Manual.
type: string
type: object
required:
- selector
type: object
status:
properties:
collisionCount:
description: Count of hash collisions for the UnitedDeployment. The
UnitedDeployment 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:
description: Represents the latest available observations of a UnitedDeployment's
current state.
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
type: object
type: array
currentRevision:
description: CurrentRevision, if not empty, indicates the current version
of the UnitedDeployment.
type: string
observedGeneration:
description: ObservedGeneration is the most recent generation observed
for this UnitedDeployment. It corresponds to the UnitedDeployment's
generation, which is updated on mutation by the API Server.
format: int64
type: integer
readyReplicas:
description: The number of ready replicas.
format: int32
type: integer
replicas:
description: Replicas is the most recently observed number of replicas.
format: int32
type: integer
subsetReplicas:
description: Records the topology detail information of the replicas
of each subset.
type: object
updateStatus:
description: Records the information of update progress.
properties:
currentPartitions:
description: Records the current partition.
type: object
updatedRevision:
description: Records the latest revision.
type: string
type: object
updatedReadyReplicas:
description: The number of ready current revision replicas for this
UnitedDeployment.
format: int32
type: integer
updatedReplicas:
description: The number of pods in current version.
format: int32
type: integer
required:
- replicas
- updatedReplicas
- currentRevision
type: object
version: v1alpha1
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []

View File

@ -0,0 +1,113 @@
apiVersion: v1
kind: Namespace
metadata:
labels:
control-plane: controller-manager
controller-tools.k8s.io: "1.0"
name: kruise-system
---
apiVersion: v1
kind: Service
metadata:
labels:
control-plane: controller-manager
controller-tools.k8s.io: "1.0"
name: kruise-controller-manager-service
namespace: kruise-system
spec:
ports:
- port: 443
selector:
control-plane: controller-manager
controller-tools.k8s.io: "1.0"
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
labels:
control-plane: controller-manager
controller-tools.k8s.io: "1.0"
name: kruise-controller-manager
namespace: kruise-system
spec:
replicas: 1
serviceName: kruise-controller-manager-service
revisionHistoryLimit: {{ .Values.revisionHistoryLimit }}
selector:
matchLabels:
control-plane: controller-manager
controller-tools.k8s.io: "1.0"
template:
metadata:
annotations:
prometheus.io/scrape: "true"
labels:
control-plane: controller-manager
controller-tools.k8s.io: "1.0"
spec:
containers:
- command:
- /manager
args:
- "--metrics-addr={{ .Values.manager.metrics.addr }}:{{ .Values.manager.metrics.port }}"
- "--logtostderr=true"
- "--v={{ .Values.manager.log.level }}"
env:
- name: POD_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: SECRET_NAME
value: kruise-webhook-server-secret
- name: CUSTOM_RESOURCE_ENABLE
value: {{ .Values.manager.custom_resource_enable }}
image: openkruise/kruise-manager:v0.4.1
imagePullPolicy: IfNotPresent
name: manager
ports:
- containerPort: {{ .Values.manager.metrics.port }}
name: metrics
protocol: TCP
- containerPort: 9876
name: webhook-server
protocol: TCP
readinessProbe:
tcpSocket:
port: 9876
resources:
{{- toYaml .Values.manager.resources | nindent 12 }}
volumeMounts:
- mountPath: /tmp/cert
name: cert
readOnly: true
terminationGracePeriodSeconds: 10
{{- if .Values.spec.nodeAffinity }}
affinity:
{{- end }}
{{- with .Values.spec.nodeAffinity }}
nodeAffinity:
{{ toYaml . | indent 10 }}
{{- end }}
{{- if .Values.spec.nodeSelector }}
nodeSelector:
{{ toYaml .Values.spec.nodeSelector | indent 8 }}
{{- end }}
{{- if .Values.spec.tolerations }}
tolerations:
{{ toYaml .Values.spec.tolerations | indent 8 }}
{{- end }}
volumes:
- name: cert
secret:
defaultMode: 420
secretName: kruise-webhook-server-secret
---
apiVersion: v1
kind: Secret
metadata:
name: kruise-webhook-server-secret
namespace: kruise-system

View File

@ -0,0 +1,335 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
creationTimestamp: null
name: kruise-manager-role
rules:
- apiGroups:
- ""
resources:
- pods
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- ""
resources:
- nodes
verbs:
- get
- list
- watch
- apiGroups:
- ""
resources:
- pods/status
verbs:
- get
- update
- patch
- apiGroups:
- apps.kruise.io
resources:
- broadcastjobs
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- apps.kruise.io
resources:
- broadcastjobs/status
verbs:
- get
- update
- patch
- apiGroups:
- ""
resources:
- pods
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- ""
resources:
- pods/status
verbs:
- get
- update
- patch
- apiGroups:
- ""
resources:
- events
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- ""
resources:
- persistentvolumeclaims
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- apps
resources:
- controllerrevisions
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- apps.kruise.io
resources:
- clonesets
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- apps.kruise.io
resources:
- clonesets/status
verbs:
- get
- update
- patch
- apiGroups:
- ""
resources:
- configmaps
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- apps.kruise.io
resources:
- sidecarsets
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- apps.kruise.io
resources:
- sidecarsets/status
verbs:
- get
- update
- patch
- apiGroups:
- ""
resources:
- pods
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- ""
resources:
- pods/status
verbs:
- get
- update
- patch
- apiGroups:
- ""
resources:
- events
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- ""
resources:
- persistentvolumeclaims
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- apps
resources:
- controllerrevisions
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- apps.kruise.io
resources:
- statefulsets
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- apps.kruise.io
resources:
- statefulsets/status
verbs:
- get
- update
- patch
- apiGroups:
- apps.kruise.io
resources:
- uniteddeployments
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- apps.kruise.io
resources:
- uniteddeployments/status
verbs:
- get
- update
- patch
- apiGroups:
- apps
resources:
- statefulsets
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- apps
resources:
- statefulsets/status
verbs:
- get
- update
- patch
- apiGroups:
- apps.kruise.io
resources:
- statefulsets
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- apps.kruise.io
resources:
- statefulsets/status
verbs:
- get
- update
- patch
- apiGroups:
- admissionregistration.k8s.io
resources:
- mutatingwebhookconfigurations
- validatingwebhookconfigurations
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- ""
resources:
- secrets
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- ""
resources:
- services
verbs:
- get
- list
- watch
- create
- update
- patch
- delete

View File

@ -0,0 +1,13 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
creationTimestamp: null
name: kruise-manager-rolebinding
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: kruise-manager-role
subjects:
- kind: ServiceAccount
name: default
namespace: kruise-system

View File

@ -0,0 +1,120 @@
apiVersion: admissionregistration.k8s.io/v1beta1
kind: MutatingWebhookConfiguration
metadata:
name: kruise-mutating-webhook-configuration
---
apiVersion: admissionregistration.k8s.io/v1beta1
kind: ValidatingWebhookConfiguration
metadata:
name: kruise-validating-webhook-configuration
webhooks:
- clientConfig:
caBundle: fake
service:
name: webhook-server-service
namespace: kruise-system
path: /validating-create-update-broadcastjob
failurePolicy: Fail
name: validating-create-update-broadcastjob.kruise.io
namespaceSelector:
matchExpressions:
- key: control-plane
operator: DoesNotExist
rules:
- apiGroups:
- apps.kruise.io
apiVersions:
- v1alpha1
operations:
- CREATE
- UPDATE
resources:
- broadcastjobs
- clientConfig:
caBundle: fake
service:
name: webhook-server-service
namespace: kruise-system
path: /validating-create-update-cloneset
failurePolicy: Fail
name: validating-create-update-cloneset.kruise.io
namespaceSelector:
matchExpressions:
- key: control-plane
operator: DoesNotExist
rules:
- apiGroups:
- apps.kruise.io
apiVersions:
- v1alpha1
operations:
- CREATE
- UPDATE
resources:
- clonesets
- clientConfig:
caBundle: fake
service:
name: webhook-server-service
namespace: kruise-system
path: /validating-create-update-sidecarset
failurePolicy: Fail
name: validating-create-update-sidecarset.kruise.io
namespaceSelector:
matchExpressions:
- key: control-plane
operator: DoesNotExist
rules:
- apiGroups:
- apps.kruise.io
apiVersions:
- v1alpha1
operations:
- CREATE
- UPDATE
resources:
- sidecarsets
- clientConfig:
caBundle: fake
service:
name: webhook-server-service
namespace: kruise-system
path: /validating-create-update-statefulset
failurePolicy: Fail
name: validating-create-update-statefulset.kruise.io
namespaceSelector:
matchExpressions:
- key: control-plane
operator: DoesNotExist
rules:
- apiGroups:
- apps.kruise.io
apiVersions:
- v1alpha1
operations:
- CREATE
- UPDATE
resources:
- statefulsets
- clientConfig:
caBundle: fake
service:
name: webhook-server-service
namespace: kruise-system
path: /validating-create-update-uniteddeployment
failurePolicy: Fail
name: validating-create-update-uniteddeployment.kruise.io
namespaceSelector:
matchExpressions:
- key: control-plane
operator: DoesNotExist
rules:
- apiGroups:
- apps.kruise.io
apiVersions:
- v1alpha1
operations:
- CREATE
- UPDATE
resources:
- uniteddeployments

View File

@ -0,0 +1,29 @@
# Default values for kruise.
revisionHistoryLimit: 3
spec:
nodeAffinity: {}
nodeSelector: {}
tolerations: []
manager:
# settings for log print
log:
# log level for kruise-manager
level: "4"
# resources of kruise-manager container
resources:
limits:
cpu: 100m
memory: 256Mi
requests:
cpu: 100m
memory: 256Mi
metrics:
addr: localhost
port: 8080
custom_resource_enable:

View File

@ -0,0 +1,17 @@
apiVersion: v1
name: kruise
description: Helm chart for all kruise-manager components
version: 0.5.0
appVersion: 0.5.0
icon: http://openkruise.io/img/kruise_white.png
keywords:
- kubernetes
- kruise
- workload
- statefulset
- sidecar
- job
- deployment
home: https://openkruise.io
sources:
- https://github.com/openkruise/kruise

View File

@ -0,0 +1,50 @@
# Kruise
## Install
```bash
helm install kruise https://github.com/openkruise/kruise/releases/download/v0.5.0/kruise-chart.tgz
```
you will see follow:
```
NAME: kruise
LAST DEPLOYED: Mon Jan 6 14:47:48 2020
NAMESPACE: default
STATUS: deployed
REVISION: 1
TEST SUITE: None
```
## Uninstall
```bash
$ helm delete kruise
release "kruise" uninstalled
```
## Configuration
The following table lists the configurable parameters of the kruise chart and their default values.
| Parameter | Description | Default |
|-------------------------------------------|--------------------------------------------------------------------|-------------------------------------|
| `log.level` | Log level that kruise-manager printed | `4` |
| `revisionHistoryLimit` | Limit of revision history | `3` |
| `manager.resources.limits.cpu` | CPU resource limit of kruise-manager container | `100m` |
| `manager.resources.limits.memory` | Memory resource limit of kruise-manager container | `256Mi` |
| `manager.resources.requests.cpu` | CPU resource request of kruise-manager container | `100m` |
| `manager.resources.requests.memory` | Memory resource request of kruise-manager container | `256Mi` |
| `manager.metrics.addr` | Addr of metrics served | `localhost` |
| `manager.metrics.port` | Port of metrics served | `8080` |
| `manager.custom_resource_enable` | Custom resources enabled by kruise-manager | `""(empty means all enabled)` |
| `spec.nodeAffinity` | Node affinity policy for kruise-manager pod | `{}` |
| `spec.nodeSelector` | Node labels for kruise-manager pod | `{}` |
| `spec.tolerations` | Tolerations for kruise-manager pod | `[]`
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,
```bash
# helm install kruise https://github.com/openkruise/kruise/releases/download/v0.5.0/kruise-chart.tgz --set manager.log.level=5,manager.custom_resource_enable="StatefulSet\,SidecarSet"
```

View File

@ -0,0 +1,201 @@
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
creationTimestamp: null
labels:
controller-tools.k8s.io: "1.0"
name: broadcastjobs.apps.kruise.io
spec:
additionalPrinterColumns:
- JSONPath: .status.desired
description: The desired number of pods. This is typically equal to the number
of nodes satisfied to run pods.
name: Desired
type: integer
- JSONPath: .status.active
description: The number of actively running pods.
name: Active
type: integer
- JSONPath: .status.succeeded
description: The number of pods which reached phase Succeeded.
name: Succeeded
type: integer
- JSONPath: .status.failed
description: The number of pods which reached phase Failed.
name: Failed
type: integer
- 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.
name: AGE
type: date
group: apps.kruise.io
names:
kind: BroadcastJob
plural: broadcastjobs
shortNames:
- bj
scope: Namespaced
subresources:
status: {}
validation:
openAPIV3Schema:
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/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/api-conventions.md#types-kinds'
type: string
metadata:
type: object
spec:
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
failurePolicy:
description: FailurePolicy indicates the behavior of the job, when failed
pod is found.
properties:
restartLimit:
description: RestartLimit specifies the number of retries before
marking the pod failed.
format: int32
type: integer
type:
description: Type indicates the type of FailurePolicyType.
type: string
type: object
parallelism:
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.
oneOf:
- type: string
- type: integer
paused:
description: Paused will pause the job.
type: boolean
template:
description: Template describes the pod that will be created when executing
a job.
type: object
required:
- template
- completionPolicy
type: object
status:
properties:
active:
description: The number of actively running pods.
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. It is
represented in RFC3339 form and is in UTC.
format: date-time
type: string
conditions:
description: The latest available observations of an object's current
state. +patchMergeKey=type +patchStrategy=merge
items:
properties:
lastProbeTime:
description: Last time the condition was checked.
format: date-time
type: string
lastTransitionTime:
description: Last time the condition transit from one status to
another.
format: date-time
type: string
message:
description: Human readable message indicating details about last
transition.
type: string
reason:
description: (brief) 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 job condition, Complete or Failed.
type: string
required:
- type
- status
type: object
type: array
desired:
description: The desired number of pods, this is typically equal to
the number of nodes satisfied to run pods.
format: int32
type: integer
failed:
description: The number of pods which reached phase Failed.
format: int32
type: integer
phase:
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.
format: date-time
type: string
succeeded:
description: The number of pods which reached phase Succeeded.
format: int32
type: integer
required:
- active
- succeeded
- failed
- desired
- phase
type: object
version: v1alpha1
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []

View File

@ -0,0 +1,320 @@
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
creationTimestamp: null
labels:
controller-tools.k8s.io: "1.0"
name: clonesets.apps.kruise.io
spec:
additionalPrinterColumns:
- JSONPath: .spec.replicas
description: The desired number of pods.
name: DESIRED
type: integer
- JSONPath: .status.updatedReplicas
description: The number of pods updated.
name: UPDATED
type: integer
- JSONPath: .status.updatedReadyReplicas
description: The number of pods updated and ready.
name: UPDATED_READY
type: integer
- JSONPath: .status.readyReplicas
description: The number of pods ready.
name: READY
type: integer
- JSONPath: .status.replicas
description: The number of currently all pods.
name: TOTAL
type: integer
- 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.
name: AGE
type: date
group: apps.kruise.io
names:
kind: CloneSet
plural: clonesets
shortNames:
- clone
scope: Namespaced
subresources:
scale:
labelSelectorPath: .status.labelSelector
specReplicasPath: .spec.replicas
statusReplicasPath: .status.replicas
status: {}
validation:
openAPIV3Schema:
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/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/api-conventions.md#types-kinds'
type: string
metadata:
type: object
spec:
properties:
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)
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.
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.
format: int32
type: integer
scaleStrategy:
description: ScaleStrategy indicates the ScaleStrategy that will be
employed to create and delete Pods in the CloneSet.
properties:
podsToDelete:
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'
type: object
template:
description: Template describes the pods that will be created.
type: object
updateStrategy:
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.
format: int32
type: integer
type: object
maxSurge:
description: 'The maximum number of pods that can be scheduled above
the desired replicas during the update. Value can be an absolute
number (ex: 5) or a percentage of desired pods (ex: 10%). Absolute
number is calculated from percentage by rounding up. Defaults
to 0.'
oneOf:
- type: string
- type: integer
maxUnavailable:
description: 'The maximum number of pods that can be unavailable
during the update. Value can be an absolute number (ex: 5) or
a percentage of desired pods (ex: 10%). Absolute number is calculated
from percentage by rounding up. Defaults to 20%.'
oneOf:
- type: string
- type: integer
partition:
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.
format: int32
type: integer
paused:
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.
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:
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:
properties:
matchSelector:
description: MatchSelector is used to select by pod's
labels.
type: object
weight:
description: Weight associated with matching the corresponding
matchExpressions, in the range 1-100.
format: int32
type: integer
required:
- weight
- matchSelector
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.
items:
properties:
key:
type: string
value:
type: string
required:
- key
- value
type: object
type: array
type:
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.
items:
type: object
type: array
required:
- replicas
- selector
- template
type: object
status:
properties:
availableReplicas:
description: AvailableReplicas is the number of Pods created by the
CloneSet controller that have a Ready Condition for at least minReadySeconds.
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.
format: int32
type: integer
conditions:
description: Conditions represents the latest available observations
of a CloneSet's current state.
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 CloneSet condition.
type: string
required:
- type
- status
type: object
type: array
labelSelector:
description: LabelSelector is label selectors for query over pods 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.
format: int64
type: integer
readyReplicas:
description: ReadyReplicas is the number of Pods created by the CloneSet
controller that have a Ready Condition.
format: int32
type: integer
replicas:
description: Replicas is the number of Pods created by the CloneSet
controller.
format: int32
type: integer
updateRevision:
description: UpdateRevision, if not empty, indicates the latest revision
of the CloneSet.
type: string
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.
format: int32
type: integer
updatedReplicas:
description: UpdatedReplicas is the number of Pods created by the CloneSet
controller from the CloneSet version indicated by updateRevision.
format: int32
type: integer
required:
- replicas
- readyReplicas
- availableReplicas
- updatedReplicas
- updatedReadyReplicas
type: object
version: v1alpha1
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []

View File

@ -0,0 +1,118 @@
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
creationTimestamp: null
labels:
controller-tools.k8s.io: "1.0"
name: sidecarsets.apps.kruise.io
spec:
additionalPrinterColumns:
- JSONPath: .status.matchedPods
description: The number of pods matched.
name: MATCHED
type: integer
- JSONPath: .status.updatedPods
description: The number of pods matched and updated.
name: UPDATED
type: integer
- JSONPath: .status.readyPods
description: The number of pods matched and ready.
name: READY
type: integer
- 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.
name: AGE
type: date
group: apps.kruise.io
names:
kind: SidecarSet
plural: sidecarsets
scope: Cluster
subresources:
status: {}
validation:
openAPIV3Schema:
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/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/api-conventions.md#types-kinds'
type: string
metadata:
type: object
spec:
properties:
containers:
description: Containers is the list of sidecar containers to be injected
into the selected pod
items:
type: object
type: array
paused:
description: Paused indicates that the sidecarset is paused and will
not be processed by the sidecarset controller.
type: boolean
selector:
description: selector is a label query over pods that should be injected
type: object
strategy:
description: The sidecarset strategy to use to replace existing pods
with new ones.
properties:
rollingUpdate:
properties:
maxUnavailable:
oneOf:
- type: string
- type: integer
type: object
type: object
volumes:
description: List of volumes that can be mounted by sidecar containers
items:
type: object
type: array
type: object
status:
properties:
matchedPods:
description: matchedPods is the number of Pods whose labels are matched
with this SidecarSet's selector and are created after sidecarset creates
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.
format: int64
type: integer
readyPods:
description: readyPods is the number of matched Pods that have a ready
condition
format: int32
type: integer
updatedPods:
description: updatedPods is the number of matched Pods that are injected
with the latest SidecarSet's containers
format: int32
type: integer
required:
- matchedPods
- updatedPods
- readyPods
type: object
version: v1alpha1
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []

View File

@ -0,0 +1,294 @@
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
creationTimestamp: null
labels:
controller-tools.k8s.io: "1.0"
name: statefulsets.apps.kruise.io
spec:
additionalPrinterColumns:
- JSONPath: .spec.replicas
description: The desired number of pods.
name: DESIRED
type: integer
- JSONPath: .status.replicas
description: The number of currently all pods.
name: CURRENT
type: integer
- JSONPath: .status.updatedReplicas
description: The number of pods updated.
name: UPDATED
type: integer
- JSONPath: .status.readyReplicas
description: The number of pods ready.
name: READY
type: integer
- 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.
name: AGE
type: date
group: apps.kruise.io
names:
kind: StatefulSet
plural: statefulsets
shortNames:
- sts
scope: Namespaced
subresources:
scale:
labelSelectorPath: .status.labelSelector
specReplicasPath: .spec.replicas
statusReplicasPath: .status.replicas
status: {}
validation:
openAPIV3Schema:
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/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/api-conventions.md#types-kinds'
type: string
metadata:
type: object
spec:
properties:
podManagementPolicy:
description: podManagementPolicy controls how pods are created during
initial scale up, when replacing pods on nodes, or when scaling down.
The default policy is `OrderedReady`, where pods are created in increasing
order (pod-0, then pod-1, etc) and the controller will wait until
each pod is ready before continuing. When scaling down, the pods are
removed in the opposite order. The alternative policy is `Parallel`
which will create pods in parallel to match the desired scale without
waiting, and on scale down will delete all pods at once.
type: string
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, but individual replicas also have a consistent
identity. If unspecified, defaults to 1. TODO: Consider a rename of
this field.'
format: int32
type: integer
revisionHistoryLimit:
description: revisionHistoryLimit is the maximum number of revisions
that will be maintained in the StatefulSet's revision history. The
revision history consists of all revisions not represented by a currently
applied StatefulSetSpec version. The default value is 10.
format: int32
type: integer
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'
type: object
serviceName:
description: 'serviceName is the name of the service that governs this
StatefulSet. This service must exist before the StatefulSet, and is
responsible for the network identity of the set. Pods get DNS/hostnames
that follow the pattern: pod-specific-string.serviceName.default.svc.cluster.local
where "pod-specific-string" is managed by the StatefulSet controller.'
type: string
template:
description: template is the object that describes the pod that will
be created if insufficient replicas are detected. Each pod stamped
out by the StatefulSet will fulfill this Template, but have a unique
identity from the rest of the StatefulSet.
type: object
updateStrategy:
description: updateStrategy indicates the StatefulSetUpdateStrategy
that will be employed to update Pods in the StatefulSet when a revision
is made to Template.
properties:
rollingUpdate:
description: RollingUpdate is used to communicate parameters when
Type is RollingUpdateStatefulSetStrategyType.
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.
format: int32
type: integer
type: object
maxUnavailable:
description: 'The maximum number of pods that can be unavailable
during the update. Value can be an absolute number (ex: 5)
or a percentage of desired pods (ex: 10%). Absolute number
is calculated from percentage by rounding down. Also, maxUnavailable
can just be allowed to work with Parallel podManagementPolicy.
Defaults to 1.'
oneOf:
- type: string
- type: integer
partition:
description: '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. - It means controller
will update $(replicas - partition) number of pod. Default
value is 0.'
format: int32
type: integer
paused:
description: Paused indicates that the StatefulSet is paused.
Default value is false
type: boolean
podUpdatePolicy:
description: PodUpdatePolicy indicates how pods should be updated
Default value is "ReCreate"
type: string
unorderedUpdate:
description: UnorderedUpdate contains strategies for non-ordered
update. If it is not nil, pods will be updated with non-ordered
sequence. Noted that UnorderedUpdate can only be allowed to
work with Parallel podManagementPolicy
properties:
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:
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:
properties:
matchSelector:
description: MatchSelector is used to select by
pod's labels.
type: object
weight:
description: Weight associated with matching the
corresponding matchExpressions, in the range
1-100.
format: int32
type: integer
required:
- weight
- matchSelector
type: object
type: array
type: object
type: object
type: object
type:
description: Type indicates the type of the StatefulSetUpdateStrategy.
Default is RollingUpdate.
type: string
type: object
volumeClaimTemplates:
description: 'volumeClaimTemplates is a list of claims that pods are
allowed to reference. The StatefulSet controller is responsible for
mapping network identities to claims in a way that maintains the identity
of a pod. Every claim in this list must have at least one matching
(by name) volumeMount in one container in the template. A claim in
this list takes precedence over any volumes in the template, with
the same name. TODO: Define the behavior if a claim already exists
with the same name.'
items:
type: object
type: array
required:
- selector
- template
type: object
status:
properties:
collisionCount:
description: collisionCount is the count of hash collisions for the
StatefulSet. The StatefulSet controller uses this field as a collision
avoidance mechanism when it needs to create the name for the newest
ControllerRevision.
format: int32
type: integer
conditions:
description: Represents the latest available observations of a statefulset's
current state. +patchMergeKey=type +patchStrategy=merge
items:
type: object
type: array
currentReplicas:
description: currentReplicas is the number of Pods created by the StatefulSet
controller from the StatefulSet version indicated by currentRevision.
format: int32
type: integer
currentRevision:
description: currentRevision, if not empty, indicates the version of
the StatefulSet used to generate Pods in the sequence [0,currentReplicas).
type: string
labelSelector:
description: LabelSelector is label selectors for query over pods that
should match the replica count used by HPA.
type: string
observedGeneration:
description: observedGeneration is the most recent generation observed
for this StatefulSet. It corresponds to the StatefulSet's generation,
which is updated on mutation by the API Server.
format: int64
type: integer
readyReplicas:
description: readyReplicas is the number of Pods created by the StatefulSet
controller that have a Ready Condition.
format: int32
type: integer
replicas:
description: replicas is the number of Pods created by the StatefulSet
controller.
format: int32
type: integer
updateRevision:
description: updateRevision, if not empty, indicates the version of
the StatefulSet used to generate Pods in the sequence [replicas-updatedReplicas,replicas)
type: string
updatedReplicas:
description: updatedReplicas is the number of Pods created by the StatefulSet
controller from the StatefulSet version indicated by updateRevision.
format: int32
type: integer
required:
- replicas
- readyReplicas
- currentReplicas
- updatedReplicas
type: object
version: v1alpha1
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []

View File

@ -0,0 +1,436 @@
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
creationTimestamp: null
labels:
controller-tools.k8s.io: "1.0"
name: uniteddeployments.apps.kruise.io
spec:
additionalPrinterColumns:
- JSONPath: .spec.replicas
description: The desired number of pods.
name: DESIRED
type: integer
- JSONPath: .status.replicas
description: The number of currently all pods.
name: CURRENT
type: integer
- JSONPath: .status.updatedReplicas
description: The number of pods updated.
name: UPDATED
type: integer
- JSONPath: .status.readyReplicas
description: The number of pods ready.
name: READY
type: integer
- 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.
name: AGE
type: date
group: apps.kruise.io
names:
kind: UnitedDeployment
plural: uniteddeployments
shortNames:
- ud
scope: Namespaced
subresources:
scale:
labelSelectorPath: .status.selector
specReplicasPath: .spec.replicas
statusReplicasPath: .status.replicas
status: {}
validation:
openAPIV3Schema:
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/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/api-conventions.md#types-kinds'
type: string
metadata:
type: object
spec:
properties:
replicas:
description: Replicas is the total desired replicas of all the subsets.
If unspecified, defaults to 1.
format: int32
type: integer
revisionHistoryLimit:
description: Indicates the number of histories to be conserved. If unspecified,
defaults to 10.
format: int32
type: integer
selector:
description: Selector is a label query over pods that should match the
replica count. It must match the pod template's labels.
type: object
template:
description: Template describes the subset that will be created.
properties:
advancedStatefulSetTemplate:
description: AdvancedStatefulSet template
properties:
metadata:
type: object
spec:
properties:
podManagementPolicy:
description: podManagementPolicy controls how pods are created
during initial scale up, when replacing pods on nodes,
or when scaling down. The default policy is `OrderedReady`,
where pods are created in increasing order (pod-0, then
pod-1, etc) and the controller will wait until each pod
is ready before continuing. When scaling down, the pods
are removed in the opposite order. The alternative policy
is `Parallel` which will create pods in parallel to match
the desired scale without waiting, and on scale down will
delete all pods at once.
type: string
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, but
individual replicas also have a consistent identity. If
unspecified, defaults to 1. TODO: Consider a rename of
this field.'
format: int32
type: integer
revisionHistoryLimit:
description: revisionHistoryLimit is the maximum number
of revisions that will be maintained in the StatefulSet's
revision history. The revision history consists of all
revisions not represented by a currently applied StatefulSetSpec
version. The default value is 10.
format: int32
type: integer
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'
type: object
serviceName:
description: 'serviceName is the name of the service that
governs this StatefulSet. This service must exist before
the StatefulSet, and is responsible for the network identity
of the set. Pods get DNS/hostnames that follow the pattern:
pod-specific-string.serviceName.default.svc.cluster.local
where "pod-specific-string" is managed by the StatefulSet
controller.'
type: string
template:
description: template is the object that describes the pod
that will be created if insufficient replicas are detected.
Each pod stamped out by the StatefulSet will fulfill this
Template, but have a unique identity from the rest of
the StatefulSet.
type: object
updateStrategy:
description: updateStrategy indicates the StatefulSetUpdateStrategy
that will be employed to update Pods in the StatefulSet
when a revision is made to Template.
properties:
rollingUpdate:
description: RollingUpdate is used to communicate parameters
when Type is RollingUpdateStatefulSetStrategyType.
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.
format: int32
type: integer
type: object
maxUnavailable:
description: 'The maximum number of pods that can
be unavailable during the update. Value can be
an absolute number (ex: 5) or a percentage of
desired pods (ex: 10%). Absolute number is calculated
from percentage by rounding down. Also, maxUnavailable
can just be allowed to work with Parallel podManagementPolicy.
Defaults to 1.'
oneOf:
- type: string
- type: integer
partition:
description: '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. - It means controller
will update $(replicas - partition) number of
pod. Default value is 0.'
format: int32
type: integer
paused:
description: Paused indicates that the StatefulSet
is paused. Default value is false
type: boolean
podUpdatePolicy:
description: PodUpdatePolicy indicates how pods
should be updated Default value is "ReCreate"
type: string
unorderedUpdate:
description: UnorderedUpdate contains strategies
for non-ordered update. If it is not nil, pods
will be updated with non-ordered sequence. Noted
that UnorderedUpdate can only be allowed to work
with Parallel podManagementPolicy
properties:
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:
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:
properties:
matchSelector:
description: MatchSelector is used
to select by pod's labels.
type: object
weight:
description: Weight associated with
matching the corresponding matchExpressions,
in the range 1-100.
format: int32
type: integer
required:
- weight
- matchSelector
type: object
type: array
type: object
type: object
type: object
type:
description: Type indicates the type of the StatefulSetUpdateStrategy.
Default is RollingUpdate.
type: string
type: object
volumeClaimTemplates:
description: 'volumeClaimTemplates is a list of claims that
pods are allowed to reference. The StatefulSet controller
is responsible for mapping network identities to claims
in a way that maintains the identity of a pod. Every claim
in this list must have at least one matching (by name)
volumeMount in one container in the template. A claim
in this list takes precedence over any volumes in the
template, with the same name. TODO: Define the behavior
if a claim already exists with the same name.'
items:
type: object
type: array
required:
- selector
- template
type: object
required:
- spec
type: object
statefulSetTemplate:
description: StatefulSet template
properties:
metadata:
type: object
spec:
type: object
required:
- spec
type: object
type: object
topology:
description: Topology describes the pods distribution detail between
each of subsets.
properties:
subsets:
description: Contains the details of each subset. Each element in
this array represents one subset which will be provisioned and
managed by UnitedDeployment.
items:
properties:
name:
description: Indicates subset name as a DNS_LABEL, which will
be used to generate subset workload name prefix in the format
'<deployment-name>-<subset-name>-'. Name should be unique
between all of the subsets under one UnitedDeployment.
type: string
nodeSelectorTerm:
description: Indicates the node selector to form the subset.
Depending on the node selector, pods provisioned could be
distributed across multiple groups of nodes. A subset's
nodeSelectorTerm is not allowed to be updated.
type: object
replicas:
description: Indicates the number of the pod to be created
under this subset. Replicas could also be 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.
oneOf:
- type: string
- type: integer
tolerations:
description: Indicates the tolerations the pods under this
subset have. A subset's tolerations is not allowed to be
updated.
items:
type: object
type: array
required:
- name
type: object
type: array
type: object
updateStrategy:
description: UpdateStrategy indicates the strategy the UnitedDeployment
use to preform the update, when template is changed.
properties:
manualUpdate:
description: Includes all of the parameters a Manual update strategy
needs.
properties:
partitions:
description: Indicates number of subset partition.
type: object
type: object
type:
description: Type of UnitedDeployment update strategy. Default is
Manual.
type: string
type: object
required:
- selector
type: object
status:
properties:
collisionCount:
description: Count of hash collisions for the UnitedDeployment. The
UnitedDeployment 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:
description: Represents the latest available observations of a UnitedDeployment's
current state.
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
type: object
type: array
currentRevision:
description: CurrentRevision, if not empty, indicates the current version
of the UnitedDeployment.
type: string
observedGeneration:
description: ObservedGeneration is the most recent generation observed
for this UnitedDeployment. It corresponds to the UnitedDeployment's
generation, which is updated on mutation by the API Server.
format: int64
type: integer
readyReplicas:
description: The number of ready replicas.
format: int32
type: integer
replicas:
description: Replicas is the most recently observed number of replicas.
format: int32
type: integer
subsetReplicas:
description: Records the topology detail information of the replicas
of each subset.
type: object
updateStatus:
description: Records the information of update progress.
properties:
currentPartitions:
description: Records the current partition.
type: object
updatedRevision:
description: Records the latest revision.
type: string
type: object
updatedReadyReplicas:
description: The number of ready current revision replicas for this
UnitedDeployment.
format: int32
type: integer
updatedReplicas:
description: The number of pods in current version.
format: int32
type: integer
required:
- replicas
- updatedReplicas
- currentRevision
type: object
version: v1alpha1
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []

View File

@ -0,0 +1,113 @@
apiVersion: v1
kind: Namespace
metadata:
labels:
control-plane: controller-manager
controller-tools.k8s.io: "1.0"
name: kruise-system
---
apiVersion: v1
kind: Service
metadata:
labels:
control-plane: controller-manager
controller-tools.k8s.io: "1.0"
name: kruise-controller-manager-service
namespace: kruise-system
spec:
ports:
- port: 443
selector:
control-plane: controller-manager
controller-tools.k8s.io: "1.0"
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
labels:
control-plane: controller-manager
controller-tools.k8s.io: "1.0"
name: kruise-controller-manager
namespace: kruise-system
spec:
replicas: 1
serviceName: kruise-controller-manager-service
revisionHistoryLimit: {{ .Values.revisionHistoryLimit }}
selector:
matchLabels:
control-plane: controller-manager
controller-tools.k8s.io: "1.0"
template:
metadata:
annotations:
prometheus.io/scrape: "true"
labels:
control-plane: controller-manager
controller-tools.k8s.io: "1.0"
spec:
containers:
- command:
- /manager
args:
- "--metrics-addr={{ .Values.manager.metrics.addr }}:{{ .Values.manager.metrics.port }}"
- "--logtostderr=true"
- "--v={{ .Values.manager.log.level }}"
env:
- name: POD_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: SECRET_NAME
value: kruise-webhook-server-secret
- name: CUSTOM_RESOURCE_ENABLE
value: {{ .Values.manager.custom_resource_enable }}
image: openkruise/kruise-manager:v0.5.0
imagePullPolicy: IfNotPresent
name: manager
ports:
- containerPort: {{ .Values.manager.metrics.port }}
name: metrics
protocol: TCP
- containerPort: 9876
name: webhook-server
protocol: TCP
readinessProbe:
tcpSocket:
port: 9876
resources:
{{- toYaml .Values.manager.resources | nindent 12 }}
volumeMounts:
- mountPath: /tmp/cert
name: cert
readOnly: true
terminationGracePeriodSeconds: 10
{{- if .Values.spec.nodeAffinity }}
affinity:
{{- end }}
{{- with .Values.spec.nodeAffinity }}
nodeAffinity:
{{ toYaml . | indent 10 }}
{{- end }}
{{- if .Values.spec.nodeSelector }}
nodeSelector:
{{ toYaml .Values.spec.nodeSelector | indent 8 }}
{{- end }}
{{- if .Values.spec.tolerations }}
tolerations:
{{ toYaml .Values.spec.tolerations | indent 8 }}
{{- end }}
volumes:
- name: cert
secret:
defaultMode: 420
secretName: kruise-webhook-server-secret
---
apiVersion: v1
kind: Secret
metadata:
name: kruise-webhook-server-secret
namespace: kruise-system

View File

@ -0,0 +1,335 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
creationTimestamp: null
name: kruise-manager-role
rules:
- apiGroups:
- ""
resources:
- pods
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- ""
resources:
- nodes
verbs:
- get
- list
- watch
- apiGroups:
- ""
resources:
- pods/status
verbs:
- get
- update
- patch
- apiGroups:
- apps.kruise.io
resources:
- broadcastjobs
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- apps.kruise.io
resources:
- broadcastjobs/status
verbs:
- get
- update
- patch
- apiGroups:
- ""
resources:
- pods
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- ""
resources:
- pods/status
verbs:
- get
- update
- patch
- apiGroups:
- ""
resources:
- events
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- ""
resources:
- persistentvolumeclaims
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- apps
resources:
- controllerrevisions
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- apps.kruise.io
resources:
- clonesets
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- apps.kruise.io
resources:
- clonesets/status
verbs:
- get
- update
- patch
- apiGroups:
- ""
resources:
- configmaps
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- apps.kruise.io
resources:
- sidecarsets
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- apps.kruise.io
resources:
- sidecarsets/status
verbs:
- get
- update
- patch
- apiGroups:
- ""
resources:
- pods
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- ""
resources:
- pods/status
verbs:
- get
- update
- patch
- apiGroups:
- ""
resources:
- events
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- ""
resources:
- persistentvolumeclaims
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- apps
resources:
- controllerrevisions
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- apps.kruise.io
resources:
- statefulsets
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- apps.kruise.io
resources:
- statefulsets/status
verbs:
- get
- update
- patch
- apiGroups:
- apps.kruise.io
resources:
- uniteddeployments
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- apps.kruise.io
resources:
- uniteddeployments/status
verbs:
- get
- update
- patch
- apiGroups:
- apps
resources:
- statefulsets
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- apps
resources:
- statefulsets/status
verbs:
- get
- update
- patch
- apiGroups:
- apps.kruise.io
resources:
- statefulsets
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- apps.kruise.io
resources:
- statefulsets/status
verbs:
- get
- update
- patch
- apiGroups:
- admissionregistration.k8s.io
resources:
- mutatingwebhookconfigurations
- validatingwebhookconfigurations
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- ""
resources:
- secrets
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- ""
resources:
- services
verbs:
- get
- list
- watch
- create
- update
- patch
- delete

View File

@ -0,0 +1,13 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
creationTimestamp: null
name: kruise-manager-rolebinding
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: kruise-manager-role
subjects:
- kind: ServiceAccount
name: default
namespace: kruise-system

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