Git Product home page Git Product logo

kruise's Introduction

Kruise

License Go Report Card CII Best Practices OpenSSF Scorecard CircleCI codecov Contributor Covenant

English | 简体中文

Introduction

OpenKruise (official site: https://openkruise.io) is a CNCF(Cloud Native Computing Foundation) incubating project. It consists of several controllers which extend and complement the Kubernetes core controllers for workload and application management.

Key Features

Quick Start

You can view the full documentation from the OpenKruise website.

Users

Registration: Who is using Kruise

  • Alibaba Group, Ant Group, DouyuTV, Sto, Boss直聘
  • hangyinxiaofei, vanyitech, Dmall, Bringg, 佐疆科技
  • Lyft, Ctrip, 享住智慧, VIPKID, zhangmen
  • xiaohongshu, bixin, 永辉科技中心, 跟谁学, 哈啰出行
  • Spectro Cloud, ihomefnt, Arkane Systems, Deepexi, 火花思维
  • OPPO, Suning.cn, joyy, Mobvista, 深圳凤凰木网络有限公司
  • xiaomi, Netease, MeiTuan Finance, Shopee, Esign
  • LinkedIn, 雪球, 兴盛优选, Wholee, LilithGames, Baidu
  • Bilibili, 冠赢互娱, MeiTuan, 同城

Contributing

You are warmly welcome to hack on Kruise. We have prepared a detailed guide CONTRIBUTING.md.

Community

Active communication channels:

  • Slack: OpenKruise channel (English)
  • DingTalk:Search GroupID 23330762 (Chinese)
  • WeChat: Search User openkruise and let the robot invite you (Chinese)
  • Bi-weekly Community Meeting (APAC, Chinese):
    • Thursday 19:30 GMT+8 (Asia/Shanghai), Calendar
    • Join Meeting(DingTalk): Search GroupID 23330762 (Chinese)
    • Notes and agenda
  • Bi-weekly Community Meeting (English): TODO

Security

Please report vulnerabilities by email to [email protected]. Also see our SECURITY.md file for details.

License

Kruise is licensed under the Apache License, Version 2.0. See LICENSE for the full license text.

kruise's People

Contributors

abner-1 avatar allencloud avatar bh4aws avatar boltslei avatar cerebrate avatar chengleqi avatar coldtea214 avatar dependabot[bot] avatar diannaowa avatar dylandee avatar fei-guo avatar fillzpp avatar furykerry avatar hantmac avatar hellolijj avatar hezhizhen avatar jetmuffin avatar jian-he avatar kevinbetterq avatar ls-2018 avatar pigletfly avatar resouer avatar rishi-anand avatar ryanzhang-oss avatar shiyan2016 avatar veophi avatar wu8685 avatar xiang90 avatar y-ykcir avatar zmberg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

kruise's Issues

[BUG]demo create failed

What happened:
kubectl create -f ./config/samples/apps_v1alpha1_broadcastjob-never-complete.yaml run error

[root@ samples]# kubectl create -f ./apps_v1alpha1_broadcastjob-never-complete.yaml 
Error from server (InternalError): error when creating "./apps_v1alpha1_broadcastjob-never-complete.yaml": Internal error occurred: Internal error occurred: jsonpatch replace operation does not apply: doc is missing path: /spec/failurePolicy/Type

What you expected to happen:

How to reproduce it (as minimally and precisely as possible):

Anything else we need to know?:

Environment:

  • Kruise version: master-5bb9bd0c214225c3a232feb6eb9ab71ab333f025
  • Kubernetes version (use kubectl version): 1.11.5
  • OS (e.g: cat /etc/os-release):
  • Kernel (e.g. uname -a):
  • Install tools:
  • Others:

Sidecarset suppot statefulset/deployment etc workload.

What would you like to be added:
Sidecarset support statefulset/deployment etc workload.

Why is this needed:
I use sidecarset to inject log container into pod,i deployed with my custom resources like sts.
Then i find the inject container not inherit my serviceAccount volumesMount, which used to communicate with k8s api .So I think the sidecarset need to support higher workload level .Becasuse we rarely deploy pod alone.

how to config external api-server address?

hi:
I changed install config like this:

spec:
containers:
- command:
- /manager
args:
- "--metrics-addr=127.0.0.1:8080"
- "--logtostderr=true"
- "--v=4"
- "--master=http://10.39.128.35:80"
env:
- name: POD_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: SECRET_NAME
value: kruise-webhook-server-secret
- name: KUBERNETES_SERVICE_HOST
value: 10.39.128.35
- name: KUBERNETES_SERVICE_PORT
value: "80"

But i got this error:

I0923 12:19:52.712803 1 main.go:54] entrypoint "level"=0 "msg"="setting up client for manager" I0923 12:19:52.713181 1 main.go:62] entrypoint "level"=0 "msg"="setting up manager" E0923 12:19:52.715201 1 :0] kubebuilder/manager "msg"="Failed to get API Group-Resources" "error"="Get https://10.39.128.35:80/api?timeout=32s: http: server gave HTTP response to HTTPS client" E0923 12:19:52.715226 1 main.go:74] entrypoint "msg"="unable to set up overall controller manager" "error"="Get https://10.39.128.35:80/api?timeout=32s: http: server gave HTTP response to HTTPS client"

why I use 80 port,but manager still use "https" to access api-server?How can i do it?
thank you!

advanced statefulset submission fails if updateStrategy is not set

kubectl apply -f guestbook-statefulset.yaml

Error from server (InternalError): error when creating "guestbook-statefulset.yaml": Internal error occurred: Internal error occurred: jsonpatch add operation does not apply: doc is missing path: "/spec/updateStrategy/rollingUpdate"

[feature request] follow the markdownlint rules to write markdown documents

What would you like to be added:
We should add a document rule for all documents in project kruise, that could make the docs well maintained. In addition, we can use the circleci-markdownlint to do the lint validation in every pull request's CI procedure.

Here is the markdownlint, and here are all the rules: https://github.com/markdownlint/markdownlint/blob/master/docs/RULES.md.

With the markdownlint effect, the project report the following error:

find  ./ -name  "*.md" | grep -v vendor | grep -v commandline |  grep -v .github |  grep -v swagger |  grep -v api |  xargs mdl -r ~MD010,~MD013,~MD024,~MD029,~MD033,~MD036

./README.md:30: MD001 Header levels should only increment by one level at a time
./README.md:8: MD009 Trailing spaces
./README.md:74: MD009 Trailing spaces
./README.md:125: MD009 Trailing spaces
./README.md:152: MD009 Trailing spaces
./README.md:55: MD022 Headers should be surrounded by blank lines
./README.md:36: MD031 Fenced code blocks should be surrounded by blank lines
./README.md:56: MD031 Fenced code blocks should be surrounded by blank lines
./README.md:86: MD031 Fenced code blocks should be surrounded by blank lines
./README.md:107: MD031 Fenced code blocks should be surrounded by blank lines
./LICENSE.md:1: MD046 Code block style
./LICENSE.md:180: MD046 Code block style
./LICENSE.md:195: MD046 Code block style
./docs/roadmap/2019-Q3.md:3: MD009 Trailing spaces
./docs/roadmap/2019-Q3.md:4: MD009 Trailing spaces
./docs/roadmap/2019-Q3.md:9: MD009 Trailing spaces
./docs/roadmap/2019-Q3.md:18: MD009 Trailing spaces
./docs/roadmap/2019-Q3.md:30: MD009 Trailing spaces
./docs/roadmap/2019-Q3.md:39: MD009 Trailing spaces
./docs/roadmap/2019-Q3.md:45: MD009 Trailing spaces
./docs/roadmap/2019-Q3.md:46: MD009 Trailing spaces
./docs/roadmap/2019-Q3.md:51: MD009 Trailing spaces
./docs/roadmap/2019-Q3.md:61: MD009 Trailing spaces
./docs/roadmap/2019-Q3.md:62: MD009 Trailing spaces
./docs/roadmap/2019-Q3.md:63: MD009 Trailing spaces
./docs/roadmap/2019-Q3.md:24: MD012 Multiple consecutive blank lines
./docs/roadmap/2019-Q3.md:28: MD012 Multiple consecutive blank lines
./docs/roadmap/2019-Q3.md:32: MD012 Multiple consecutive blank lines
./docs/roadmap/2019-Q3.md:42: MD012 Multiple consecutive blank lines
./docs/roadmap/2019-Q3.md:50: MD012 Multiple consecutive blank lines
./docs/README.md:1: MD002 First header should be a top level header
./docs/README.md:25: MD004 Unordered list style
./docs/README.md:30: MD004 Unordered list style
./docs/README.md:34: MD004 Unordered list style
./docs/README.md:9: MD009 Trailing spaces
./docs/README.md:11: MD009 Trailing spaces
./docs/README.md:14: MD009 Trailing spaces
./docs/README.md:25: MD009 Trailing spaces
./docs/README.md:27: MD009 Trailing spaces
./docs/README.md:31: MD009 Trailing spaces
./docs/README.md:39: MD009 Trailing spaces
./docs/README.md:22: MD012 Multiple consecutive blank lines
./docs/tutorial/kruise-install.md:1: MD022 Headers should be surrounded by blank lines
./docs/tutorial/kruise-install.md:6: MD022 Headers should be surrounded by blank lines
./docs/tutorial/kruise-install.md:7: MD031 Fenced code blocks should be surrounded by blank lines
./docs/tutorial/kruise-install.md:20: MD031 Fenced code blocks should be surrounded by blank lines
./docs/tutorial/helm-install.md:10: MD009 Trailing spaces
./docs/tutorial/README.md:5: MD030 Spaces after list markers
./docs/tutorial/README.md:6: MD030 Spaces after list markers
./docs/tutorial/README.md:7: MD030 Spaces after list markers
./docs/tutorial/README.md:8: MD030 Spaces after list markers
./docs/tutorial/README.md:9: MD030 Spaces after list markers
./docs/tutorial/sidecarset.md:29: MD009 Trailing spaces
./docs/tutorial/sidecarset.md:49: MD009 Trailing spaces
./docs/tutorial/sidecarset.md:112: MD009 Trailing spaces
./docs/tutorial/sidecarset.md:116: MD009 Trailing spaces
./docs/tutorial/sidecarset.md:124: MD009 Trailing spaces
./docs/tutorial/sidecarset.md:142: MD009 Trailing spaces
./docs/tutorial/sidecarset.md:31: MD012 Multiple consecutive blank lines
./docs/tutorial/sidecarset.md:41: MD012 Multiple consecutive blank lines
./docs/tutorial/sidecarset.md:106: MD012 Multiple consecutive blank lines
./docs/tutorial/sidecarset.md:126: MD012 Multiple consecutive blank lines
./docs/tutorial/sidecarset.md:1: MD022 Headers should be surrounded by blank lines
./docs/tutorial/sidecarset.md:48: MD022 Headers should be surrounded by blank lines
./docs/tutorial/sidecarset.md:38: MD031 Fenced code blocks should be surrounded by blank lines
./docs/tutorial/sidecarset.md:43: MD031 Fenced code blocks should be surrounded by blank lines
./docs/tutorial/sidecarset.md:52: MD031 Fenced code blocks should be surrounded by blank lines
./docs/tutorial/sidecarset.md:117: MD031 Fenced code blocks should be surrounded by blank lines
./docs/tutorial/sidecarset.md:148: MD031 Fenced code blocks should be surrounded by blank lines
./docs/tutorial/sidecarset.md:150: MD031 Fenced code blocks should be surrounded by blank lines
./docs/tutorial/advanced-statefulset.md:1: MD009 Trailing spaces
./docs/tutorial/advanced-statefulset.md:64: MD009 Trailing spaces
./docs/tutorial/advanced-statefulset.md:79: MD009 Trailing spaces
./docs/tutorial/advanced-statefulset.md:83: MD009 Trailing spaces
./docs/tutorial/advanced-statefulset.md:91: MD009 Trailing spaces
./docs/tutorial/advanced-statefulset.md:156: MD009 Trailing spaces
./docs/tutorial/advanced-statefulset.md:158: MD009 Trailing spaces
./docs/tutorial/advanced-statefulset.md:190: MD009 Trailing spaces
./docs/tutorial/advanced-statefulset.md:191: MD009 Trailing spaces
./docs/tutorial/advanced-statefulset.md:238: MD009 Trailing spaces
./docs/tutorial/advanced-statefulset.md:5: MD012 Multiple consecutive blank lines
./docs/tutorial/advanced-statefulset.md:95: MD012 Multiple consecutive blank lines
./docs/tutorial/advanced-statefulset.md:1: MD022 Headers should be surrounded by blank lines
./docs/tutorial/advanced-statefulset.md:63: MD022 Headers should be surrounded by blank lines
./docs/tutorial/advanced-statefulset.md:96: MD022 Headers should be surrounded by blank lines
./docs/tutorial/advanced-statefulset.md:23: MD031 Fenced code blocks should be surrounded by blank lines
./docs/tutorial/advanced-statefulset.md:31: MD031 Fenced code blocks should be surrounded by blank lines
./docs/tutorial/advanced-statefulset.md:37: MD031 Fenced code blocks should be surrounded by blank lines
./docs/tutorial/advanced-statefulset.md:67: MD031 Fenced code blocks should be surrounded by blank lines
./docs/tutorial/advanced-statefulset.md:84: MD031 Fenced code blocks should be surrounded by blank lines
./docs/tutorial/advanced-statefulset.md:98: MD031 Fenced code blocks should be surrounded by blank lines
./docs/tutorial/advanced-statefulset.md:132: MD031 Fenced code blocks should be surrounded by blank lines
./docs/tutorial/advanced-statefulset.md:151: MD031 Fenced code blocks should be surrounded by blank lines
./docs/tutorial/advanced-statefulset.md:188: MD031 Fenced code blocks should be surrounded by blank lines
./docs/tutorial/advanced-statefulset.md:190: MD031 Fenced code blocks should be surrounded by blank lines
./docs/tutorial/advanced-statefulset.md:201: MD031 Fenced code blocks should be surrounded by blank lines
./docs/tutorial/advanced-statefulset.md:215: MD031 Fenced code blocks should be surrounded by blank lines
./docs/tutorial/advanced-statefulset.md:247: MD031 Fenced code blocks should be surrounded by blank lines
./docs/tutorial/advanced-statefulset.md:159: MD038 Spaces inside code span elements
./docs/tutorial/broadcastjob.md:42: MD009 Trailing spaces
./docs/tutorial/broadcastjob.md:5: MD012 Multiple consecutive blank lines
./docs/tutorial/broadcastjob.md:41: MD012 Multiple consecutive blank lines
./docs/tutorial/broadcastjob.md:6: MD022 Headers should be surrounded by blank lines
./docs/tutorial/broadcastjob.md:31: MD022 Headers should be surrounded by blank lines
./docs/tutorial/broadcastjob.md:8: MD031 Fenced code blocks should be surrounded by blank lines
./docs/tutorial/broadcastjob.md:17: MD031 Fenced code blocks should be surrounded by blank lines
./docs/tutorial/broadcastjob.md:21: MD031 Fenced code blocks should be surrounded by blank lines
./docs/tutorial/broadcastjob.md:23: MD031 Fenced code blocks should be surrounded by blank lines
./docs/tutorial/broadcastjob.md:34: MD031 Fenced code blocks should be surrounded by blank lines
./docs/concepts/broadcastJob/README.md:69: MD001 Header levels should only increment by one level at a time
./docs/concepts/broadcastJob/README.md:20: MD002 First header should be a top level header
./docs/concepts/broadcastJob/README.md:3: MD009 Trailing spaces
./docs/concepts/broadcastJob/README.md:5: MD009 Trailing spaces
./docs/concepts/broadcastJob/README.md:6: MD009 Trailing spaces
./docs/concepts/broadcastJob/README.md:8: MD009 Trailing spaces
./docs/concepts/broadcastJob/README.md:10: MD009 Trailing spaces
./docs/concepts/broadcastJob/README.md:11: MD009 Trailing spaces
./docs/concepts/broadcastJob/README.md:17: MD009 Trailing spaces
./docs/concepts/broadcastJob/README.md:19: MD009 Trailing spaces
./docs/concepts/broadcastJob/README.md:23: MD009 Trailing spaces
./docs/concepts/broadcastJob/README.md:24: MD009 Trailing spaces
./docs/concepts/broadcastJob/README.md:37: MD009 Trailing spaces
./docs/concepts/broadcastJob/README.md:38: MD009 Trailing spaces
./docs/concepts/broadcastJob/README.md:43: MD009 Trailing spaces
./docs/concepts/broadcastJob/README.md:45: MD009 Trailing spaces
./docs/concepts/broadcastJob/README.md:47: MD009 Trailing spaces
./docs/concepts/broadcastJob/README.md:48: MD009 Trailing spaces
./docs/concepts/broadcastJob/README.md:52: MD009 Trailing spaces
./docs/concepts/broadcastJob/README.md:55: MD009 Trailing spaces
./docs/concepts/broadcastJob/README.md:58: MD009 Trailing spaces
./docs/concepts/broadcastJob/README.md:60: MD009 Trailing spaces
./docs/concepts/broadcastJob/README.md:61: MD009 Trailing spaces
./docs/concepts/broadcastJob/README.md:69: MD009 Trailing spaces
./docs/concepts/broadcastJob/README.md:82: MD009 Trailing spaces
./docs/concepts/broadcastJob/README.md:105: MD009 Trailing spaces
./docs/concepts/broadcastJob/README.md:126: MD009 Trailing spaces
./docs/concepts/broadcastJob/README.md:127: MD009 Trailing spaces
./docs/concepts/broadcastJob/README.md:27: MD012 Multiple consecutive blank lines
./docs/concepts/broadcastJob/README.md:20: MD022 Headers should be surrounded by blank lines
./docs/concepts/broadcastJob/README.md:22: MD022 Headers should be surrounded by blank lines
./docs/concepts/broadcastJob/README.md:28: MD022 Headers should be surrounded by blank lines
./docs/concepts/broadcastJob/README.md:38: MD022 Headers should be surrounded by blank lines
./docs/concepts/broadcastJob/README.md:60: MD022 Headers should be surrounded by blank lines
./docs/concepts/broadcastJob/README.md:69: MD022 Headers should be surrounded by blank lines
./docs/concepts/broadcastJob/README.md:81: MD022 Headers should be surrounded by blank lines
./docs/concepts/broadcastJob/README.md:125: MD022 Headers should be surrounded by blank lines
./docs/concepts/broadcastJob/README.md:145: MD022 Headers should be surrounded by blank lines
./docs/concepts/broadcastJob/README.md:1: MD023 Headers must start at the beginning of the line
./docs/concepts/broadcastJob/README.md:72: MD031 Fenced code blocks should be surrounded by blank lines
./docs/concepts/broadcastJob/README.md:75: MD031 Fenced code blocks should be surrounded by blank lines
./docs/concepts/broadcastJob/README.md:107: MD031 Fenced code blocks should be surrounded by blank lines
./docs/concepts/broadcastJob/README.md:128: MD031 Fenced code blocks should be surrounded by blank lines
./docs/concepts/broadcastJob/README.md:148: MD031 Fenced code blocks should be surrounded by blank lines
./docs/concepts/broadcastJob/README.md:162: MD031 Fenced code blocks should be surrounded by blank lines
./docs/concepts/broadcastJob/README.md:76: MD032 Lists should be surrounded by blank lines
./docs/concepts/broadcastJob/README.md:164: MD032 Lists should be surrounded by blank lines
./docs/concepts/astatefulset/README.md:29: MD001 Header levels should only increment by one level at a time
./docs/concepts/astatefulset/README.md:4: MD009 Trailing spaces
./docs/concepts/astatefulset/README.md:8: MD009 Trailing spaces
./docs/concepts/astatefulset/README.md:26: MD009 Trailing spaces
./docs/concepts/astatefulset/README.md:33: MD009 Trailing spaces
./docs/concepts/astatefulset/README.md:34: MD009 Trailing spaces
./docs/concepts/astatefulset/README.md:35: MD009 Trailing spaces
./docs/concepts/astatefulset/README.md:69: MD009 Trailing spaces
./docs/concepts/astatefulset/README.md:70: MD009 Trailing spaces
./docs/concepts/astatefulset/README.md:72: MD009 Trailing spaces
./docs/concepts/astatefulset/README.md:80: MD009 Trailing spaces
./docs/concepts/astatefulset/README.md:81: MD009 Trailing spaces
./docs/concepts/astatefulset/README.md:83: MD009 Trailing spaces
./docs/concepts/astatefulset/README.md:85: MD009 Trailing spaces
./docs/concepts/astatefulset/README.md:108: MD009 Trailing spaces
./docs/concepts/astatefulset/README.md:111: MD009 Trailing spaces
./docs/concepts/astatefulset/README.md:114: MD009 Trailing spaces
./docs/concepts/astatefulset/README.md:67: MD012 Multiple consecutive blank lines
./docs/concepts/astatefulset/README.md:68: MD012 Multiple consecutive blank lines
./docs/concepts/astatefulset/README.md:29: MD022 Headers should be surrounded by blank lines
./docs/concepts/astatefulset/README.md:69: MD022 Headers should be surrounded by blank lines
./docs/concepts/astatefulset/README.md:153: MD022 Headers should be surrounded by blank lines
./docs/concepts/astatefulset/README.md:154: MD030 Spaces after list markers
./docs/concepts/astatefulset/README.md:11: MD031 Fenced code blocks should be surrounded by blank lines
./docs/concepts/astatefulset/README.md:86: MD031 Fenced code blocks should be surrounded by blank lines
./docs/concepts/astatefulset/README.md:154: MD032 Lists should be surrounded by blank lines
./docs/concepts/sidecarSet/README.md:57: MD009 Trailing spaces
./docs/concepts/sidecarSet/README.md:102: MD022 Headers should be surrounded by blank lines
./docs/concepts/sidecarSet/README.md:100: MD031 Fenced code blocks should be surrounded by blank lines
./docs/concepts/sidecarSet/README.md:103: MD032 Lists should be surrounded by blank lines

A detailed description of the rules is available at https://github.com/markdownlint/markdownlint/blob/master/docs/RULES.md
Exited with code 123

Why is this needed:
Adding a standard of markdown files are essential for the projects.

[BUG]version information in tutorial's doc is not math the tag version

Hi,

when I switched the tag v0.1.0 on /docs/tutorial/kruise-install.md, I found the urls of YAML files would not change to the v0.1.0 version's address:

* e.g.
Install Kruise CRDs
kubectl apply -f https://raw.githubusercontent.com/kruiseio/kruise/master/config/crds/apps_v1alpha1_broadcastjob.yaml
kubectl apply -f https://raw.githubusercontent.com/kruiseio/kruise/master/config/crds/apps_v1alpha1_sidecarset.yaml
kubectl apply -f https://raw.githubusercontent.com/kruiseio/kruise/master/config/crds/apps_v1alpha1_statefulset.yaml
Install kruise-manager
kubectl apply -f https://raw.githubusercontent.com/kruiseio/kruise/master/config/manager/all_in_one.yaml

the verion in the urls were still master, and I checked the docker image's tag in https://raw.githubusercontent.com/kruiseio/kruise/master/config/manager/all_in_one.yaml was :daily which was updated 20 hours ago on dockerhub, but v0.1.0 was updated 5 days ago.

I suppose the version should be related to v0.1.0, when we change the tag to v0.1.0. And maybe there are some other docs need to be modified.

[BUG] failed calling webhook "validating-create-update-statefulset.kruise.io"

What happened:

➜  ~ helm install kruise charts/
NAME: kruise
LAST DEPLOYED: 2019-10-08 18:04:20.434671 +0800 CST m=+1.213182168
NAMESPACE: default
STATUS: deployed

➜  ~ kubectl get crd
NAME                           CREATED AT
broadcastjobs.apps.kruise.io   2019-10-08T10:04:20Z
sidecarsets.apps.kruise.io     2019-10-08T10:04:20Z
statefulsets.apps.kruise.io    2019-10-08T10:04:20Z
➜  ~ kubectl apply -f https://raw.githubusercontent.com/kruiseio/kruise/master/docs/tutorial/v1/redis-master-deployment.yaml
kubectl apply -f https://raw.githubusercontent.com/kruiseio/kruise/master/docs/tutorial/v1/redis-master-service.yaml
kubectl apply -f https://raw.githubusercontent.com/kruiseio/kruise/master/docs/tutorial/v1/redis-slave-deployment.yaml
kubectl apply -f https://raw.githubusercontent.com/kruiseio/kruise/master/docs/tutorial/v1/redis-slave-service.yaml
deployment.apps/redis-master created
service/redis-master created
deployment.apps/redis-slave created
service/redis-slave created
➜  ~ kubectl apply -f https://raw.githubusercontent.com/kruiseio/kruise/master/docs/tutorial/v1/guestbook-statefulset.yaml
kubectl apply -f https://raw.githubusercontent.com/kruiseio/kruise/master/docs/tutorial/v1/guestbook-service.yaml
Error from server (InternalError): error when creating "https://raw.githubusercontent.com/kruiseio/kruise/master/docs/tutorial/v1/guestbook-statefulset.yaml": Internal error occurred: failed calling webhook "validating-create-update-statefulset.kruise.io": Post https://kruise-webhook-server-service.kruise-system.svc:443/validating-create-update-statefulset?timeout=30s: service "kruise-webhook-server-service" not found
service/guestbook created

What you expected to happen:

guesbook app install successful

How to reproduce it (as minimally and precisely as possible):

Anything else we need to know?:

Environment:

  • Kruise version:
    master

  • Kubernetes version (use kubectl version):
    v1.16.0

  • OS (e.g: cat /etc/os-release):

System Info:
 Machine ID:                 3fce04d06bbf44aeb2c8daa0047b2895
 System UUID:                16C8B0A5-433E-4585-B700-08ACD37AB0A7
 Boot ID:                    5a7676b7-8d40-467e-b799-3943eba90868
 Kernel Version:             4.15.0
 OS Image:                   Buildroot 2018.05.3
 Operating System:           linux
 Architecture:               amd64
 Container Runtime Version:  docker://18.9.9
 Kubelet Version:            v1.16.0
 Kube-Proxy Version:         v1.16.0
  • Kernel (e.g. uname -a):
    4.15.0
  • Install tools:
    minikube
  • Others:

[BUG]

What happened:

When I used SidecarSet with Deployment, the sidecar container could be injected to the pod, but the sidecar container could not be updated. There is a quick review(the yaml's detail please see the section 'How to reproduce it'):

after create sidecarset:

# kubectl get sidecarsets.apps.kruise.io
NAME                MATCHED   UPDATED   READY   AGE
guestbook-sidecar   0         0         0       35s

after creat guestbook-sts-for-sidecar-demo:

# kubectl get pod
NAME                                      READY   STATUS    RESTARTS   AGE
guestbook-with-sidecar-7794fc5859-4567d   2/2     Running   0          19s
guestbook-with-sidecar-7794fc5859-5wx8m   2/2     Running   0          19s
guestbook-with-sidecar-7794fc5859-6pwv5   2/2     Running   0          19s
guestbook-with-sidecar-7794fc5859-8qqs9   2/2     Running   0          19s
guestbook-with-sidecar-7794fc5859-8v8b6   2/2     Running   0          19s
guestbook-with-sidecar-7794fc5859-bghjf   2/2     Running   0          19s
guestbook-with-sidecar-7794fc5859-c2jbw   2/2     Running   0          18s
guestbook-with-sidecar-7794fc5859-fpr26   2/2     Running   0          18s
guestbook-with-sidecar-7794fc5859-gjbwj   2/2     Running   0          18s
guestbook-with-sidecar-7794fc5859-hhbpn   2/2     Running   0          19s
guestbook-with-sidecar-7794fc5859-j6nr6   2/2     Running   0          19s
guestbook-with-sidecar-7794fc5859-kj7wl   2/2     Running   0          18s
guestbook-with-sidecar-7794fc5859-p6gsv   2/2     Running   0          19s
guestbook-with-sidecar-7794fc5859-qrcbb   2/2     Running   0          19s
guestbook-with-sidecar-7794fc5859-r2n44   2/2     Running   0          18s
guestbook-with-sidecar-7794fc5859-rwlgw   2/2     Running   0          19s
guestbook-with-sidecar-7794fc5859-sn627   2/2     Running   0          19s
guestbook-with-sidecar-7794fc5859-tjbvx   2/2     Running   0          19s
guestbook-with-sidecar-7794fc5859-vgj54   2/2     Running   0          18s
guestbook-with-sidecar-7794fc5859-zbcdt   2/2     Running   0          19s

then see the sidecarsets:

# kubectl get sidecarsets.apps.kruise.io
NAME                MATCHED   UPDATED   READY   AGE
guestbook-sidecar   20        20        0       4m23s

check the images in pod:

# kubectl describe pod guestbook-with-sidecar-7794fc5859-4567d | grep Image:
    Image:          openkruise/guestbook:v1
    Image:          openkruise/guestbook:sidecar

you can see the image I run in sidecar is openkruise/guestbook:sidecar the same as offical guide. then apply it to openkruise/guestbook:sidecar-v2 and see sidecarsets(no detaction found):

# kubectl get sidecarsets.apps.kruise.io
NAME                MATCHED   UPDATED   READY   AGE
guestbook-sidecar   20        0         0       10m

check the pod(RESTART not changed):

# kubectl get pod
NAME                                      READY   STATUS    RESTARTS   AGE
guestbook-with-sidecar-7794fc5859-4567d   2/2     Running   0          8m37s
guestbook-with-sidecar-7794fc5859-5wx8m   2/2     Running   0          8m37s
guestbook-with-sidecar-7794fc5859-6pwv5   2/2     Running   0          8m37s
guestbook-with-sidecar-7794fc5859-8qqs9   2/2     Running   0          8m37s
guestbook-with-sidecar-7794fc5859-8v8b6   2/2     Running   0          8m37s
guestbook-with-sidecar-7794fc5859-bghjf   2/2     Running   0          8m37s
guestbook-with-sidecar-7794fc5859-c2jbw   2/2     Running   0          8m36s
guestbook-with-sidecar-7794fc5859-fpr26   2/2     Running   0          8m36s
guestbook-with-sidecar-7794fc5859-gjbwj   2/2     Running   0          8m36s
guestbook-with-sidecar-7794fc5859-hhbpn   2/2     Running   0          8m37s
guestbook-with-sidecar-7794fc5859-j6nr6   2/2     Running   0          8m37s
guestbook-with-sidecar-7794fc5859-kj7wl   2/2     Running   0          8m36s
guestbook-with-sidecar-7794fc5859-p6gsv   2/2     Running   0          8m37s
guestbook-with-sidecar-7794fc5859-qrcbb   2/2     Running   0          8m37s
guestbook-with-sidecar-7794fc5859-r2n44   2/2     Running   0          8m36s
guestbook-with-sidecar-7794fc5859-rwlgw   2/2     Running   0          8m37s
guestbook-with-sidecar-7794fc5859-sn627   2/2     Running   0          8m37s
guestbook-with-sidecar-7794fc5859-tjbvx   2/2     Running   0          8m37s
guestbook-with-sidecar-7794fc5859-vgj54   2/2     Running   0          8m36s
guestbook-with-sidecar-7794fc5859-zbcdt   2/2     Running   0          8m37s

check the images(no updated):

# kubectl describe pod guestbook-with-sidecar-7794fc5859-4567d | grep Image:
    Image:          openkruise/guestbook:v1
    Image:          openkruise/guestbook:sidecar

What you expected to happen:

the sidecar could be updated when SidecarSet is used with Deployment.

How to reproduce it (as minimally and precisely as possible):

just follow the offical example "https://github.com/openkruise/kruise/blob/master/docs/tutorial/sidecarset.md" but only change the guestbook-sts-for-sidecar-demo.yam to bellow:

#apiVersion: apps.kruise.io/v1alpha1
#kind: StatefulSet
#apiVersion: extensions/v1beta1
apiVersion: apps/v1
kind: Deployment
metadata:
  name: guestbook-with-sidecar
  labels:
    app: guestbook
    version: "1.0"
spec:
  replicas: 20
#  serviceName: guestbook-with-sidecar
  selector:
    matchLabels:
      app.kubernetes.io/name:  guestbook-with-sidecar
  template:
    metadata:
      labels:
        app.kubernetes.io/name:  guestbook-with-sidecar
        version: "1.0"
    spec:
      readinessGates:
        # A new condition that ensures the pod remains at NotReady state while the in-place update is happening
        - conditionType: InPlaceUpdateReady
      containers:
      - name: guestbook
        image: openkruise/guestbook:v1
        ports:
        - name: http-server
          containerPort: 3000
#  podManagementPolicy: Parallel  # allow parallel updates, works together with maxUnavailable
#  updateStrategy:
#    type: RollingUpdate
#    rollingUpdate:
#      # Do in-place update if possible, currently only image update is supported for in-place update
#      podUpdatePolicy: InPlaceIfPossible
#      # Allow parallel updates with max number of unavailable instances equals to 2
#      maxUnavailable: 3

Anything else we need to know?:

  1. the SidecarSet works well with StatefulSet(injecting and updating)
  2. if we use apiVersion: apps.kruise.io/v1alpha1 in guestbook-sts-for-sidecar-demo.yaml, there will be an erro when apply it:
error: unable to recognize "guestbook-sts-for-sidecar-demo.yaml": no matches for kind "Deployment" in version "apps.kruise.io/v1alpha1"
  1. Deployment does not support podManagementPolicy and updateStrategy, so I delete them from the guestbook-sts-for-sidecar-demo.yaml.

Environment:

  • Kruise version:
v0.1.0
  • Kubernetes version (use kubectl version):
Client Version: version.Info{Major:"1", Minor:"15", GitVersion:"v1.15.1", GitCommit:"4485c6f18cee9a5d3c3b4e523bd27972b1b53892", GitTreeState:"clean", BuildDate:"2019-07-18T09:18:22Z", GoVersion:"go1.12.5", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"15", GitVersion:"v1.15.1", GitCommit:"4485c6f18cee9a5d3c3b4e523bd27972b1b53892", GitTreeState:"clean", BuildDate:"2019-07-18T09:09:21Z", GoVersion:"go1.12.5", Compiler:"gc", Platform:"linux/amd64"}
  • OS (e.g: cat /etc/os-release):
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"

CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"
  • Kernel (e.g. uname -a):
Linux k8s-company01-master01 3.10.0-957.10.1.el7.x86_64 #1 SMP Mon Mar 18 15:06:45 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
  • Install tools:
kubeadm kubectl helm
  • Others:

[Broadcast job] how to use broadcast job to configure Docker configuration and then restart Docker service

What would you like to be added:
I want to use broadcast job to configure Docker configuration and then restart Docker service

Why is this needed:
I need to configure Docker in many hosts, manual configuration is not realistic. So I want to use broadcast job to do this.

My Issue:
I don't know how to execute host command in container to restart docker service. And there are no related demos or docs for such situation.

Do you have any solutions or suggestions?
Thank you.

[Kruise] Support Helm installation

Current issue:

  1. Kruise requires manual installation.
  2. Kruise requires manual distribution.

What users expect:

$ helm install apphub/kruise

A BroadcastCronjob is needed?

What would you like to be added:
I want to run cronjob in the kubernetes nodes for labels

Why is this needed:
I think this is useful. For example, synchronous time, check file.

[code format] gocode check should have rule and use CI to lock down rules

What would you like to be added:
Good go code format is the fundamental part of project kruise.

With the tool gomentalinter(deprecated, we will use https://github.com/golangci/golangci-lint later), we use the command gometalinter --disable-all --skip vendor -E gofmt -E goimports -E golint -E goconst -E ineffassign -E misspell -E vet -d ./... and get the following results:

pkg/controller/broadcastjob/broadcastjob_controller_test.go:83:2:warning: ineffectual assignment to err (ineffassign)
pkg/controller/broadcastjob/broadcastjob_controller_test.go:87:2:warning: ineffectual assignment to err (ineffassign)
pkg/controller/broadcastjob/broadcastjob_controller_test.go:128:2:warning: ineffectual assignment to err (ineffassign)
pkg/controller/broadcastjob/broadcastjob_controller_test.go:136:2:warning: ineffectual assignment to err (ineffassign)
pkg/controller/broadcastjob/broadcastjob_controller_test.go:177:2:warning: ineffectual assignment to err (ineffassign)
pkg/controller/broadcastjob/broadcastjob_controller_test.go:236:2:warning: ineffectual assignment to err (ineffassign)
DEBUG: [Jul 11 02:21:06.391] nolint: parsing pkg/controller/statefulset/stateful_set_control_test.go took 8.919083ms
DEBUG: [Jul 11 02:21:06.391] nolint: parsing pkg/controller/statefulset/statefulset_controller_test.go for directives
pkg/controller/statefulset/stateful_set_control_test.go:255:6:warning: ineffectual assignment to pods (ineffassign)
DEBUG: [Jul 11 02:21:06.394] nolint: parsing pkg/controller/statefulset/statefulset_controller_test.go took 3.449273ms
DEBUG: [Jul 11 02:21:06.394] nolint: parsing test/e2e/apps/statefulset.go for directives
pkg/controller/statefulset/statefulset_controller_test.go:119:2:warning: ineffectual assignment to pods (ineffassign)
pkg/controller/statefulset/statefulset_controller_test.go:173:2:warning: ineffectual assignment to pods (ineffassign)
pkg/controller/statefulset/statefulset_controller_test.go:665:3:warning: ineffectual assignment to pod (ineffassign)
DEBUG: [Jul 11 02:21:06.399] nolint: parsing test/e2e/apps/statefulset.go took 4.767768ms
test/e2e/apps/statefulset.go:1264:2:warning: ineffectual assignment to currentRevision (ineffassign)
test/e2e/apps/statefulset.go:1264:19:warning: ineffectual assignment to updateRevision (ineffassign)
DEBUG: [Jul 11 02:21:06.489] [misspell.6]: misspell hits 1: ^(?P<path>.*?\.go):(?P<line>\d+):(?P<col>\d+):\s*(?P<message>.*)$
DEBUG: [Jul 11 02:21:06.489] [misspell.6]: misspell linter took 157.240526ms
DEBUG: [Jul 11 02:21:06.489] nolint: parsing pkg/controller/broadcastjob/broadcastjob_utils.go for directives
DEBUG: [Jul 11 02:21:06.489] nolint: parsing pkg/controller/broadcastjob/broadcastjob_utils.go took 496.757µs
pkg/controller/broadcastjob/broadcastjob_utils.go:43:78:warning: "succceeded" is a misspelling of "succeeded" (misspell)
DEBUG: [Jul 11 02:21:06.501] [gofmt.1]: gofmt hits 3: ^(?P<path>.*?\.go)$
DEBUG: [Jul 11 02:21:06.501] nolint: parsing pkg/controller/broadcastjob/broadcastjob_controller.go for directives
DEBUG: [Jul 11 02:21:06.501] [gofmt.1]: gofmt linter took 173.321387ms
DEBUG: [Jul 11 02:21:06.503] nolint: parsing pkg/controller/broadcastjob/broadcastjob_controller.go took 2.036661ms
DEBUG: [Jul 11 02:21:06.503] nolint: parsing pkg/controller/statefulset/stateful_inplace_utils_test.go for directives
pkg/controller/broadcastjob/broadcastjob_controller.go:1::warning: file is not gofmted with -s (gofmt)
DEBUG: [Jul 11 02:21:06.504] nolint: parsing pkg/controller/statefulset/stateful_inplace_utils_test.go took 856.035µs
DEBUG: [Jul 11 02:21:06.504] nolint: parsing pkg/webhook/default_server/pod/mutating/pod_create_handler.go for directives
pkg/controller/statefulset/stateful_inplace_utils_test.go:1::warning: file is not gofmted with -s (gofmt)
DEBUG: [Jul 11 02:21:06.505] nolint: parsing pkg/webhook/default_server/pod/mutating/pod_create_handler.go took 464.38µs
pkg/webhook/default_server/pod/mutating/pod_create_handler.go:1::warning: file is not gofmted with -s (gofmt)
DEBUG: [Jul 11 02:21:06.782] [golint.3]: golint hits 160: ^(?P<path>.*?\.go):(?P<line>\d+):(?P<col>\d+):\s*(?P<message>.*)$
docs/tutorial/v1/images/guestbook/main.go:37:8:warning: should omit type map[string][]string from declaration of var lists; it will be inferred from the right-hand side (golint)
docs/tutorial/v1/images/guestbook/main.go:40:6:warning: exported type Input should have comment or be unexported (golint)
docs/tutorial/v1/images/guestbook/main.go:44:1:warning: exported function GetList should have comment or be unexported (golint)
docs/tutorial/v1/images/guestbook/main.go:65:1:warning: exported function AppendToList should have comment or be unexported (golint)
docs/tutorial/v1/images/guestbook/main.go:85:1:warning: exported function ListRangeHandler should have comment or be unexported (golint)
docs/tutorial/v1/images/guestbook/main.go:100:1:warning: exported function ListPushHandler should have comment or be unexported (golint)
docs/tutorial/v1/images/guestbook/main.go:119:1:warning: exported function InfoHandler should have comment or be unexported (golint)
docs/tutorial/v1/images/guestbook/main.go:136:1:warning: exported function EnvHandler should have comment or be unexported (golint)
docs/tutorial/v1/images/guestbook/main.go:153:1:warning: exported function HelloHandler should have comment or be unexported (golint)
DEBUG: [Jul 11 02:21:06.782] nolint: parsing hack/gen-openapi-spec/main.go for directives
docs/tutorial/v1/images/guestbook/main.go:165:2:warning: don't use underscores in Go names; var master_port should be masterPort (golint)
DEBUG: [Jul 11 02:21:06.783] nolint: parsing hack/gen-openapi-spec/main.go took 292.268µs
DEBUG: [Jul 11 02:21:06.783] nolint: parsing pkg/apis/apps/v1alpha1/broadcastjob_types.go for directives
hack/gen-openapi-spec/main.go:20:6:warning: func generateSwaggerJson should be generateSwaggerJSON (golint)
DEBUG: [Jul 11 02:21:06.783] nolint: parsing pkg/apis/apps/v1alpha1/broadcastjob_types.go took 340.518µs
DEBUG: [Jul 11 02:21:06.783] nolint: parsing pkg/apis/apps/v1alpha1/defaults.go for directives
pkg/apis/apps/v1alpha1/broadcastjob_types.go:74:6:warning: exported type CompletionPolicyType should have comment or be unexported (golint)
pkg/apis/apps/v1alpha1/broadcastjob_types.go:124:6:warning: exported type JobConditionType should have comment or be unexported (golint)
DEBUG: [Jul 11 02:21:06.783] nolint: parsing pkg/apis/apps/v1alpha1/defaults.go took 85.261µs
DEBUG: [Jul 11 02:21:06.783] nolint: parsing pkg/apis/apps/v1alpha1/sidecarset_types.go for directives
pkg/apis/apps/v1alpha1/defaults.go:26:6:warning: don't use underscores in Go names; func SetDefaults_BroadcastJob should be SetDefaultsBroadcastJob (golint)
DEBUG: [Jul 11 02:21:06.783] nolint: parsing pkg/apis/apps/v1alpha1/sidecarset_types.go took 149.014µs
DEBUG: [Jul 11 02:21:06.783] nolint: parsing pkg/client/generic_client.go for directives
pkg/apis/apps/v1alpha1/sidecarset_types.go:35:6:warning: exported type SidecarContainer should have comment or be unexported (golint)
DEBUG: [Jul 11 02:21:06.783] nolint: parsing pkg/client/generic_client.go took 123.118µs
DEBUG: [Jul 11 02:21:06.783] nolint: parsing pkg/client/registry.go for directives
pkg/client/generic_client.go:9:6:warning: exported type GenericClientset should have comment or be unexported (golint)
DEBUG: [Jul 11 02:21:06.784] nolint: parsing pkg/client/registry.go took 90.133µs
DEBUG: [Jul 11 02:21:06.784] nolint: parsing pkg/controller/statefulset/stateful_inplace_utils.go for directives
pkg/client/registry.go:11:1:warning: exported function NewRegistry should have comment or be unexported (golint)
pkg/client/registry.go:20:1:warning: exported function GetGenericClient should have comment or be unexported (golint)
pkg/controller/broadcastjob/broadcastjob_controller.go:169:9:warning: should omit 2nd value from range; this loop is equivalent to `for i := range ...` (golint)
pkg/controller/broadcastjob/broadcastjob_controller.go:590:9:warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
pkg/controller/broadcastjob/broadcastjob_utils.go:30:1:warning: exported function IsJobFinished should have comment or be unexported (golint)
DEBUG: [Jul 11 02:21:06.784] nolint: parsing pkg/controller/statefulset/stateful_inplace_utils.go took 679.874µs
DEBUG: [Jul 11 02:21:06.784] nolint: parsing pkg/controller/statefulset/stateful_pod_control.go for directives
pkg/controller/statefulset/stateful_inplace_utils.go:37:1:warning: comment on exported type InPlaceUpdateSpec should be of the form "InPlaceUpdateSpec ..." (with optional leading article) (golint)
pkg/controller/statefulset/stateful_inplace_utils.go:156:2:warning: var patchJson should be patchJSON (golint)
pkg/controller/statefulset/stateful_inplace_utils.go:162:2:warning: var podJson should be podJSON (golint)
pkg/controller/statefulset/stateful_inplace_utils.go:163:2:warning: var newPodJson should be newPodJSON (golint)
pkg/controller/statefulset/stateful_inplace_utils.go:189:2:warning: var inPlaceUpdateStateJson should be inPlaceUpdateStateJSON (golint)
DEBUG: [Jul 11 02:21:06.786] nolint: parsing pkg/controller/statefulset/stateful_pod_control.go took 2.182271ms
DEBUG: [Jul 11 02:21:06.786] nolint: parsing pkg/controller/statefulset/stateful_pod_control_test.go for directives
pkg/controller/statefulset/stateful_pod_control.go:58:1:warning: exported function NewRealStatefulPodControl should have comment or be unexported (golint)
pkg/controller/statefulset/stateful_pod_control.go:168:11:warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
DEBUG: [Jul 11 02:21:06.788] nolint: parsing pkg/controller/statefulset/stateful_pod_control_test.go took 1.816987ms
DEBUG: [Jul 11 02:21:06.788] nolint: parsing pkg/controller/statefulset/stateful_set_control.go for directives
pkg/controller/statefulset/stateful_pod_control_test.go:378:10:warning: if block ends with a return statement, so drop this else and outdent its block (golint)
DEBUG: [Jul 11 02:21:06.790] [golint.3]: golint linter took 459.639266ms
DEBUG: [Jul 11 02:21:06.790] nolint: parsing pkg/controller/statefulset/stateful_set_control.go took 1.646204ms
DEBUG: [Jul 11 02:21:06.790] nolint: parsing pkg/controller/statefulset/stateful_set_status_updater.go for directives
pkg/controller/statefulset/stateful_set_control.go:34:1:warning: comment on exported type StatefulSetControlInterface should be of the form "StatefulSetControlInterface ..." (with optional leading article) (golint)
pkg/controller/statefulset/stateful_set_control.go:36:6:warning: type name will be used as statefulset.StatefulSetControlInterface by other packages, and that stutters; consider calling this ControlInterface (golint)
DEBUG: [Jul 11 02:21:06.790] nolint: parsing pkg/controller/statefulset/stateful_set_status_updater.go took 201.953µs
DEBUG: [Jul 11 02:21:06.790] nolint: parsing pkg/controller/statefulset/stateful_set_status_updater_test.go for directives
pkg/controller/statefulset/stateful_set_status_updater.go:32:6:warning: type name will be used as statefulset.StatefulSetStatusUpdaterInterface by other packages, and that stutters; consider calling this StatusUpdaterInterface (golint)
DEBUG: [Jul 11 02:21:06.791] nolint: parsing pkg/controller/statefulset/stateful_set_status_updater_test.go took 464.611µs
DEBUG: [Jul 11 02:21:06.791] nolint: parsing pkg/controller/statefulset/stateful_set_utils.go for directives
pkg/controller/statefulset/stateful_set_status_updater_test.go:98:10:warning: if block ends with a return statement, so drop this else and outdent its block (golint)
DEBUG: [Jul 11 02:21:06.792] nolint: parsing pkg/controller/statefulset/stateful_set_utils.go took 1.229438ms
DEBUG: [Jul 11 02:21:06.792] nolint: parsing pkg/controller/statefulset/statefulset_controller.go for directives
pkg/controller/statefulset/stateful_set_utils.go:44:5:warning: error var updateConflictError should have name of the form errFoo (golint)
DEBUG: [Jul 11 02:21:06.793] nolint: parsing pkg/controller/statefulset/statefulset_controller.go took 818.562µs
DEBUG: [Jul 11 02:21:06.793] nolint: parsing pkg/util/json.go for directives
pkg/controller/statefulset/statefulset_controller.go:123:1:warning: comment on exported type ReconcileStatefulSet should be of the form "ReconcileStatefulSet ..." (with optional leading article) (golint)
pkg/controller/statefulset/statefulset_controller_test.go:693:10:warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
pkg/controller/statefulset/statefulset_controller_test.go:746:10:warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
DEBUG: [Jul 11 02:21:06.793] nolint: parsing pkg/util/json.go took 53.909µs
DEBUG: [Jul 11 02:21:06.793] nolint: parsing pkg/util/patch/patch.go for directives
pkg/util/json.go:21:1:warning: exported function DumpJson should have comment or be unexported (golint)
pkg/util/json.go:21:6:warning: func DumpJson should be DumpJSON (golint)
DEBUG: [Jul 11 02:21:06.793] nolint: parsing pkg/util/patch/patch.go took 102.553µs
DEBUG: [Jul 11 02:21:06.793] nolint: parsing pkg/webhook/default_server/statefulset/mutating/statefulset_create_update_handler.go for directives
pkg/util/patch/patch.go:33:6:warning: func name will be used as patch.PatchResponseFromRaw by other packages, and that stutters; consider calling this ResponseFromRaw (golint)
pkg/webhook/default_server/pod/mutating/pod_create_handler.go:47:2:warning: exported var SidecarIgnoredNamespaces should have comment or be unexported (golint)
pkg/webhook/default_server/pod/mutating/pod_create_handler.go:97:10:warning: should omit 2nd value from range; this loop is equivalent to `for i := range ...` (golint)
pkg/webhook/default_server/pod/mutating/pod_create_handler.go:130:1:warning: exported function PodMatchSidecarSet should have comment or be unexported (golint)
DEBUG: [Jul 11 02:21:06.793] nolint: parsing pkg/webhook/default_server/statefulset/mutating/statefulset_create_update_handler.go took 432.196µs
DEBUG: [Jul 11 02:21:06.793] nolint: parsing pkg/webhook/default_server/statefulset/validating/statefulset_validation.go for directives
pkg/webhook/default_server/statefulset/mutating/statefulset_create_update_handler.go:92:1:warning: exported function SetObjectDefaults should have comment or be unexported (golint)
DEBUG: [Jul 11 02:21:06.794] nolint: parsing pkg/webhook/default_server/statefulset/validating/statefulset_validation.go took 732.902µs
DEBUG: [Jul 11 02:21:06.794] nolint: parsing pkg/webhook/default_server/statefulset/validating/statefulset_validation_test.go for directives
pkg/webhook/default_server/statefulset/validating/statefulset_validation.go:152:1:warning: comment on exported function ValidateStatefulSetUpdate should be of the form "ValidateStatefulSetUpdate ..." (golint)
pkg/webhook/default_server/statefulset/validating/statefulset_validation.go:185:2:warning: var oldTempJson should be oldTempJSON (golint)
pkg/webhook/default_server/statefulset/validating/statefulset_validation.go:186:2:warning: var newTempJson should be newTempJSON (golint)
DEBUG: [Jul 11 02:21:06.795] nolint: parsing pkg/webhook/default_server/statefulset/validating/statefulset_validation_test.go took 1.233561ms
DEBUG: [Jul 11 02:21:06.795] nolint: parsing pkg/webhook/default_server/utils/default_utils.go for directives
pkg/webhook/default_server/statefulset/validating/statefulset_validation_test.go:77:6:warning: don't use underscores in Go names; var val_1 should be val1 (golint)
DEBUG: [Jul 11 02:21:06.796] nolint: parsing pkg/webhook/default_server/utils/default_utils.go took 490.619µs
DEBUG: [Jul 11 02:21:06.796] nolint: parsing test/e2e/apps/framework.go for directives
pkg/webhook/default_server/utils/default_utils.go:24:1:warning: exported function SetDefaultPodTemplate should have comment or be unexported (golint)
DEBUG: [Jul 11 02:21:06.796] nolint: parsing test/e2e/apps/framework.go took 50.221µs
DEBUG: [Jul 11 02:21:06.796] nolint: parsing test/e2e/apps/types.go for directives
test/e2e/apps/framework.go:22:1:warning: exported function SIGDescribe should have comment or be unexported (golint)
test/e2e/apps/statefulset.go:26:2:warning: should not use dot imports (golint)
test/e2e/apps/statefulset.go:27:2:warning: should not use dot imports (golint)
DEBUG: [Jul 11 02:21:06.796] nolint: parsing test/e2e/apps/types.go took 36.253µs
DEBUG: [Jul 11 02:21:06.796] nolint: parsing test/e2e/framework/cleanup.go for directives
test/e2e/apps/types.go:25:2:warning: exported var NewNginxImage should have comment or be unexported (golint)
DEBUG: [Jul 11 02:21:06.796] nolint: parsing test/e2e/framework/cleanup.go took 122.032µs
DEBUG: [Jul 11 02:21:06.796] nolint: parsing test/e2e/framework/framework.go for directives
test/e2e/framework/cleanup.go:22:6:warning: exported type CleanupActionHandle should have comment or be unexported (golint)
DEBUG: [Jul 11 02:21:06.797] nolint: parsing test/e2e/framework/framework.go took 766.701µs
DEBUG: [Jul 11 02:21:06.797] nolint: parsing test/e2e/framework/pods.go for directives
test/e2e/framework/framework.go:39:2:warning: should not use dot imports (golint)
test/e2e/framework/framework.go:40:2:warning: should not use dot imports (golint)
test/e2e/framework/framework.go:45:2:warning: comment on exported const DefaultNamespaceDeletionTimeout should be of the form "DefaultNamespaceDeletionTimeout ..." (golint)
test/e2e/framework/framework.go:86:6:warning: exported type TestDataSummary should have comment or be unexported (golint)
test/e2e/framework/framework.go:92:6:warning: exported type FrameworkOptions should have comment or be unexported (golint)
test/e2e/framework/framework.go:92:6:warning: type name will be used as framework.FrameworkOptions by other packages, and that stutters; consider calling this Options (golint)
test/e2e/framework/framework.go:98:1:warning: comment on exported function NewDefaultFramework should be of the form "NewDefaultFramework ..." (golint)
test/e2e/framework/framework.go:108:1:warning: exported function NewFramework should have comment or be unexported (golint)
test/e2e/framework/framework.go:269:1:warning: exported method Framework.CreateNamespace should have comment or be unexported (golint)
test/e2e/framework/framework.go:299:1:warning: comment on exported function KruiseDescribe should be of the form "KruiseDescribe ..." (golint)
test/e2e/framework/framework.go:304:1:warning: comment on exported function ConformanceIt should be of the form "ConformanceIt ..." (golint)
DEBUG: [Jul 11 02:21:06.797] nolint: parsing test/e2e/framework/pods.go took 169.681µs
DEBUG: [Jul 11 02:21:06.797] nolint: parsing test/e2e/framework/provider.go for directives
test/e2e/framework/pods.go:31:1:warning: comment on exported method Framework.PodClient should be of the form "PodClient ..." (golint)
test/e2e/framework/pods.go:41:6:warning: exported type PodClient should have comment or be unexported (golint)
DEBUG: [Jul 11 02:21:06.797] nolint: parsing test/e2e/framework/provider.go took 408.736µs
DEBUG: [Jul 11 02:21:06.797] nolint: parsing test/e2e/framework/pv_util.go for directives
test/e2e/framework/provider.go:31:6:warning: exported type Factory should have comment or be unexported (golint)
test/e2e/framework/provider.go:106:1:warning: exported method NullProvider.FrameworkBeforeEach should have comment or be unexported (golint)
test/e2e/framework/provider.go:107:1:warning: exported method NullProvider.FrameworkAfterEach should have comment or be unexported (golint)
test/e2e/framework/provider.go:109:1:warning: exported method NullProvider.ResizeGroup should have comment or be unexported (golint)
test/e2e/framework/provider.go:112:1:warning: exported method NullProvider.GetGroupNodes should have comment or be unexported (golint)
test/e2e/framework/provider.go:115:1:warning: exported method NullProvider.GroupSize should have comment or be unexported (golint)
test/e2e/framework/provider.go:119:1:warning: exported method NullProvider.CreatePD should have comment or be unexported (golint)
test/e2e/framework/provider.go:122:1:warning: exported method NullProvider.DeletePD should have comment or be unexported (golint)
test/e2e/framework/provider.go:125:1:warning: exported method NullProvider.CreatePVSource should have comment or be unexported (golint)
test/e2e/framework/provider.go:128:1:warning: exported method NullProvider.DeletePVSource should have comment or be unexported (golint)
test/e2e/framework/provider.go:132:1:warning: exported method NullProvider.CleanupServiceResources should have comment or be unexported (golint)
test/e2e/framework/provider.go:135:1:warning: exported method NullProvider.EnsureLoadBalancerResourcesDeleted should have comment or be unexported (golint)
DEBUG: [Jul 11 02:21:06.798] nolint: parsing test/e2e/framework/pv_util.go took 117.325µs
test/e2e/framework/provider.go:138:1:warning: exported method NullProvider.LoadBalancerSrcRanges should have comment or be unexported (golint)
DEBUG: [Jul 11 02:21:06.798] nolint: parsing test/e2e/framework/service_util.go for directives
test/e2e/framework/provider.go:141:1:warning: exported method NullProvider.EnableAndDisableInternalLB should have comment or be unexported (golint)
test/e2e/framework/pv_util.go:36:1:warning: comment on exported function CreatePV should be of the form "CreatePV ..." (golint)
DEBUG: [Jul 11 02:21:06.798] nolint: parsing test/e2e/framework/service_util.go took 108.039µs
DEBUG: [Jul 11 02:21:06.798] nolint: parsing test/e2e/framework/statefulset_utils.go for directives
test/e2e/framework/service_util.go:25:1:warning: exported function CreateServiceSpec should have comment or be unexported (golint)
DEBUG: [Jul 11 02:21:06.801] nolint: parsing test/e2e/framework/statefulset_utils.go took 2.90789ms
DEBUG: [Jul 11 02:21:06.801] nolint: parsing test/e2e/framework/test_context.go for directives
test/e2e/framework/statefulset_utils.go:30:2:warning: should not use dot imports (golint)
test/e2e/framework/statefulset_utils.go:51:2:warning: comment on exported const StatefulSetPoll should be of the form "StatefulSetPoll ..." (golint)
test/e2e/framework/statefulset_utils.go:53:2:warning: comment on exported const StatefulSetTimeout should be of the form "StatefulSetTimeout ..." (golint)
test/e2e/framework/statefulset_utils.go:55:2:warning: comment on exported const StatefulPodTimeout should be of the form "StatefulPodTimeout ..." (golint)
test/e2e/framework/statefulset_utils.go:477:10:warning: if block ends with a return statement, so drop this else and outdent its block (golint)
test/e2e/framework/statefulset_utils.go:494:1:warning: comment on exported method StatefulSetTester.WaitForRunningAndNotReady should be of the form "WaitForRunningAndNotReady ..." (golint)
test/e2e/framework/statefulset_utils.go:514:29:warning: method SetHttpProbe should be SetHTTPProbe (golint)
test/e2e/framework/statefulset_utils.go:519:29:warning: method BreakHttpProbe should be BreakHTTPProbe (golint)
test/e2e/framework/statefulset_utils.go:530:29:warning: method BreakPodHttpProbe should be BreakPodHTTPProbe (golint)
test/e2e/framework/statefulset_utils.go:543:29:warning: method RestoreHttpProbe should be RestoreHTTPProbe (golint)
test/e2e/framework/statefulset_utils.go:554:29:warning: method RestorePodHttpProbe should be RestorePodHTTPProbe (golint)
test/e2e/framework/statefulset_utils.go:664:1:warning: receiver name p should be consistent with previous receiver name s for StatefulSetTester (golint)
test/e2e/framework/statefulset_utils.go:879:1:warning: exported function UpdateStatefulSetWithRetries should have comment or be unexported (golint)
DEBUG: [Jul 11 02:21:06.802] nolint: parsing test/e2e/framework/test_context.go took 1.122169ms
DEBUG: [Jul 11 02:21:06.802] nolint: parsing test/e2e/framework/util.go for directives
test/e2e/framework/test_context.go:172:6:warning: exported type CloudConfig should have comment or be unexported (golint)
test/e2e/framework/test_context.go:173:2:warning: struct field ApiEndpoint should be APIEndpoint (golint)
test/e2e/framework/test_context.go:193:5:warning: exported var TestContext should have comment or be unexported (golint)
test/e2e/framework/test_context.go:195:1:warning: comment on exported function RegisterCommonFlags should be of the form "RegisterCommonFlags ..." (golint)
test/e2e/framework/test_context.go:233:1:warning: comment on exported function RegisterClusterFlags should be of the form "RegisterClusterFlags ..." (golint)
test/e2e/framework/test_context.go:284:1:warning: comment on exported function RegisterNodeFlags should be of the form "RegisterNodeFlags ..." (golint)
DEBUG: [Jul 11 02:21:06.805] nolint: parsing test/e2e/framework/util.go took 3.205219ms
test/e2e/framework/util.go:34:2:warning: should not use dot imports (golint)
test/e2e/framework/util.go:35:2:warning: should not use dot imports (golint)
test/e2e/framework/util.go:61:2:warning: comment on exported const PodListTimeout should be of the form "PodListTimeout ..." (golint)
test/e2e/framework/util.go:63:2:warning: comment on exported const PodStartTimeout should be of the form "PodStartTimeout ..." (golint)
test/e2e/framework/util.go:67:2:warning: comment on exported const PodStartShortTimeout should be of the form "PodStartShortTimeout ..." (golint)
test/e2e/framework/util.go:72:2:warning: comment on exported const PodDeleteTimeout should be of the form "PodDeleteTimeout ..." (golint)
test/e2e/framework/util.go:78:2:warning: comment on exported const NamespaceCleanupTimeout should be of the form "NamespaceCleanupTimeout ..." (golint)
test/e2e/framework/util.go:86:2:warning: comment on exported const ServiceStartTimeout should be of the form "ServiceStartTimeout ..." (golint)
test/e2e/framework/util.go:89:2:warning: comment on exported const Poll should be of the form "Poll ..." (golint)
test/e2e/framework/util.go:95:2:warning: comment on exported const ServiceAccountProvisionTimeout should be of the form "ServiceAccountProvisionTimeout ..." (golint)
test/e2e/framework/util.go:99:2:warning: comment on exported const SingleCallTimeout should be of the form "SingleCallTimeout ..." (golint)
test/e2e/framework/util.go:104:2:warning: comment on exported const NodeReadyInitialTimeout should be of the form "NodeReadyInitialTimeout ..." (golint)
test/e2e/framework/util.go:108:2:warning: comment on exported const PodReadyBeforeTimeout should be of the form "PodReadyBeforeTimeout ..." (golint)
test/e2e/framework/util.go:115:2:warning: exported const ServiceRespondingTimeout should have comment (or a comment on this block) or be unexported (golint)
test/e2e/framework/util.go:118:2:warning: comment on exported const ClaimProvisionTimeout should be of the form "ClaimProvisionTimeout ..." (golint)
test/e2e/framework/util.go:121:2:warning: comment on exported const ClaimProvisionShortTimeout should be of the form "ClaimProvisionShortTimeout ..." (golint)
test/e2e/framework/util.go:125:2:warning: comment on exported const ClaimBindingTimeout should be of the form "ClaimBindingTimeout ..." (golint)
test/e2e/framework/util.go:128:2:warning: comment on exported const ClaimDeletingTimeout should be of the form "ClaimDeletingTimeout ..." (golint)
test/e2e/framework/util.go:131:2:warning: comment on exported const PVReclaimingTimeout should be of the form "PVReclaimingTimeout ..." (golint)
test/e2e/framework/util.go:134:2:warning: comment on exported const PVBindingTimeout should be of the form "PVBindingTimeout ..." (golint)
test/e2e/framework/util.go:137:2:warning: comment on exported const PVDeletingTimeout should be of the form "PVDeletingTimeout ..." (golint)
test/e2e/framework/util.go:140:2:warning: comment on exported const RestartNodeReadyAgainTimeout should be of the form "RestartNodeReadyAgainTimeout ..." (golint)
test/e2e/framework/util.go:144:2:warning: comment on exported const RestartPodReadyAgainTimeout should be of the form "RestartPodReadyAgainTimeout ..." (golint)
test/e2e/framework/util.go:168:2:warning: exported var NotReadyTaintTemplate should have comment or be unexported (golint)
test/e2e/framework/util.go:174:1:warning: comment on exported var RunId should be of the form "RunId ..." (golint)
test/e2e/framework/util.go:175:5:warning: var RunId should be RunID (golint)
test/e2e/framework/util.go:177:6:warning: exported type CreateTestingNSFn should have comment or be unexported (golint)
test/e2e/framework/util.go:467:1:warning: exported function DumpAllNamespaceInfo should have comment or be unexported (golint)
test/e2e/framework/util.go:511:6:warning: exported type EventsLister should have comment or be unexported (golint)
test/e2e/framework/util.go:513:1:warning: exported function DumpEventsInNamespace should have comment or be unexported (golint)
test/e2e/framework/util.go:545:1:warning: comment on exported function AllNodesReady should be of the form "AllNodesReady ..." (golint)
test/e2e/framework/util.go:591:1:warning: exported function RestclientConfig should have comment or be unexported (golint)
test/e2e/framework/util.go:607:6:warning: exported type ClientConfigGetter should have comment or be unexported (golint)
test/e2e/framework/util.go:609:1:warning: exported function LoadConfig should have comment or be unexported (golint)
test/e2e/framework/util.go:614:10:warning: if block ends with a return statement, so drop this else and outdent its block (golint)
test/e2e/framework/util.go:622:1:warning: exported function LoadClientset should have comment or be unexported (golint)
test/e2e/framework/util.go:638:1:warning: exported function Logf should have comment or be unexported (golint)
test/e2e/framework/util.go:642:1:warning: exported function Failf should have comment or be unexported (golint)
test/e2e/framework/util.go:654:1:warning: exported function Skipf should have comment or be unexported (golint)
test/e2e/framework/util.go:660:1:warning: exported function ExpectNoError should have comment or be unexported (golint)
test/e2e/framework/util.go:673:1:warning: exported function ExpectNoErrorWithRetries should have comment or be unexported (golint)
test/e2e/framework/util.go:745:1:warning: exported function DumpDebugInfo should have comment or be unexported (golint)
test/e2e/framework/util.go:756:1:warning: comment on exported function WaitForPodRunningInNamespace should be of the form "WaitForPodRunningInNamespace ..." (golint)
test/e2e/framework/util.go:765:1:warning: comment on exported function WaitForPodNameRunningInNamespace should be of the form "WaitForPodNameRunningInNamespace ..." (golint)
test/e2e/framework/util.go:778:1:warning: exported function WaitTimeoutForPodRunningInNamespace should have comment or be unexported (golint)
test/e2e/framework/util.go:815:1:warning: exported function NewKubectlCommand should have comment or be unexported (golint)
test/e2e/framework/util.go:815:40:warning: exported func NewKubectlCommand returns unexported type *framework.kubectlBuilder, which can be annoying to use (golint)
test/e2e/framework/util.go:877:25:warning: error strings should not be capitalized or end with punctuation or a newline (golint)
test/e2e/framework/util.go:886:11:warning: should omit type int from declaration of var rc; it will be inferred from the right-hand side (golint)
test/e2e/framework/util.go:892:22:warning: error strings should not be capitalized or end with punctuation or a newline (golint)
test/e2e/framework/util.go:898:25:warning: error strings should not be capitalized or end with punctuation or a newline (golint)
test/e2e/framework/util.go:939:1:warning: comment on exported function FilterNodes should be of the form "FilterNodes ..." (golint)
test/e2e/framework/util.go:964:1:warning: exported function IsNodeConditionSetAsExpected should have comment or be unexported (golint)
test/e2e/framework/util.go:968:1:warning: exported function IsNodeConditionSetAsExpectedSilent should have comment or be unexported (golint)
test/e2e/framework/util.go:991:13:warning: if block ends with a return statement, so drop this else and outdent its block (golint)
test/e2e/framework/util.go:1019:11:warning: if block ends with a return statement, so drop this else and outdent its block (golint)
test/e2e/framework/util.go:1035:1:warning: exported function IsNodeConditionUnset should have comment or be unexported (golint)
test/e2e/framework/util.go:1120:1:warning: exported function WaitForPodCondition should have comment or be unexported (golint)

Why is this needed:
Go code format is one essential part of project. And we can use CI system to make all the developers to follow. It brings lot of benefits to the quality of code.

Error when Install kruise-controller-manager [BUG]

What happened:Error when Install kruise-controller-manager

What you expected to happen:Install kruise-controller-manager successful

How to reproduce it (as minimally and precisely as possible):
kubectl apply -f https://raw.githubusercontent.com/kruiseio/kruise/master/config/crds/apps_v1alpha1_broadcastjob.yaml
kubectl apply -f https://raw.githubusercontent.com/kruiseio/kruise/master/config/crds/apps_v1alpha1_sidecarset.yaml
kubectl apply -f https://raw.githubusercontent.com/kruiseio/kruise/master/config/crds/apps_v1alpha1_statefulset.yaml
kubectl apply -f https://raw.githubusercontent.com/kruiseio/kruise/master/config/manager/all_in_one.yaml

Anything else we need to know?:

Environment:

  • Kruise version:latest version from github
  • Kubernetes version (use kubectl version):
    Client Version: version.Info{Major:"1", Minor:"12", GitVersion:"v1.12.1", GitCommit:"4ed3216f3ec431b140b1d899130a69fc671678f4", GitTreeState:"clean", BuildDate:"2018-10-05T16:46:06Z", GoVersion:"go1.10.4", Compiler:"gc", Platform:"linux/amd64"}
    Server Version: version.Info{Major:"1", Minor:"12+", GitVersion:"v1.12.6-aliyun.1", GitCommit:"8cb561c", GitTreeState:"", BuildDate:"2019-04-22T11:34:20Z", GoVersion:"go1.10.8", Compiler:"gc", Platform:"linux/amd64"}
  • OS (e.g: cat /etc/os-release):centos 7.6
  • Kernel (e.g. uname -a):
    Linux iZbp1ettmookclsrhltwt4Z 4.9.0-39-custom #12 SMP Sat Jul 22 13:14:22 CST 2017 x86_64 x86_64 x86_64 GNU/Linux
  • Install tools:kubectl
  • Others:

[feature request] Uniform grayscale release control for applications

What would you like to be added:
Add a unified grayscale release control for applications to describe different workloads

Why is this needed:
At present, the official k8s provides workloads such as deployment, statefulset, daemonset, etc., and provides grayscale control mechanisms such as paritiion, maxunavailable, pause, etc.. but the fields of each workload are currently different. In addition, for the application of custom operators, not only there is no uniform gray control field, and even some gray control mechanisms do not exist. Lack of uniform grayscale control mechanisms and state make it difficult to construct a universal application delivery system.

使用默认的CRD及demo无法正常创建broadcastjob[BUG]

What happened:
使用默认的config/crds/apps_v1alpha1_broadcastjob.yaml文件创建的broadcastjob的crd后,
demo例子没有运行,DESIRED也是为空

NAME                           DESIRED   ACTIVE    SUCCEEDED   FAILED    AGE
broadcastjob-active-deadline                                             13h
broadcastjob-never-complete                                              13h
broadcastjob-ttl                                                         17m
download-image                                                           15m
Name:         download-image
Namespace:    default
Labels:       <none>
Annotations:  kubectl.kubernetes.io/last-applied-configuration={"apiVersion":"apps.kruise.io/v1alpha1","kind":"BroadcastJob","metadata":{"annotations":{},"name":"download-image","namespace":"default"},"spec":{"comp...
API Version:  apps.kruise.io/v1alpha1
Kind:         BroadcastJob
Metadata:
  Creation Timestamp:  2019-11-07T01:26:34Z
  Generation:          1
  Resource Version:    22765122
  Self Link:           /apis/apps.kruise.io/v1alpha1/namespaces/default/broadcastjobs/download-image
  UID:                 a297a66f-00fd-11ea-ba9c-0800277694c4
Spec:
  Completion Policy:
    Ttl Seconds After Finished:  60
    Type:                        Always
  Template:
    Spec:
      Containers:
        Command:
          echo
          started
        Image:         openkruise/guestbook:v3
        Name:          guestbook
      Restart Policy:  Never
Events:                <none>

What you expected to happen:
使用提供的demo例子能正常运行和体验broadcastjob

How to reproduce it (as minimally and precisely as possible):

Anything else we need to know?:

Environment:

  • Kruise version: v0.2.0以上最新的分支
  • Kubernetes version (use kubectl version):v1.11.9
  • OS (e.g: cat /etc/os-release):CentOS Linux 7 (Core)
  • Kernel (e.g. uname -a):Linux ceph0 3.10.0-862.el7.x86_64 #1 SMP Fri Apr 20 16:44:24 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
  • Install tools: kubectl apply -f config/crds/apps_v1alpha1_broadcastjob.yaml
  • Others:

[question] inplace-update character : Pod id unchange

**why pod id changed ? **:
when i update image version, Pod ip is changed
Yaml:
apiVersion: apps.kruise.io/v1alpha1
kind: StatefulSet
metadata:
name: sample
spec:
replicas: 3
serviceName: fake-service
selector:
matchLabels:
app: sample
template:
metadata:
labels:
app: sample
spec:
readinessGates:
- conditionType: InPlaceUpdateReady
containers:
- name: main
image: nginx:latest
podManagementPolicy: Parallel
updateStrategy:
type: RollingUpdate
rollingUpdate:
podUpdatePolicy: InPlaceIfPossible
maxUnavailable: 2

image: nginx:latest change nginx:alpine

result:
[root@k8s-master kruise]# kubectl get pods -owide
NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES
sample-0 1/1 Running 0 6m2s 10.244.1.85 k8s-node1 1/1
sample-1 0/1 Terminating 0 6m2s 10.244.1.86 k8s-node1 1/1
sample-2 0/1 Terminating 0 6m2s 10.244.1.87 k8s-node1 1/1

[root@k8s-master kruise]# kubectl get pods -owide
NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES
sample-0 1/1 Running 0 9s 10.244.1.97 k8s-node1 1/1
sample-1 1/1 Running 0 17s 10.244.1.96 k8s-node1 1/1
sample-2 1/1 Running 0 17s 10.244.1.95 k8s-node1 1/1

[BUG]

What happened:

What you expected to happen:

How to reproduce it (as minimally and precisely as possible):

Anything else we need to know?:

Environment:

  • Kruise version:
  • Kubernetes version (use kubectl version):
  • OS (e.g: cat /etc/os-release):
  • Kernel (e.g. uname -a):
  • Install tools:
  • Others:

Add badges

  1. CI badge
  2. Code coverage badge
  3. License badge
  4. coreinfrastructure badge

[BUG]Failed to install kruise-controller-manager according to the document

What happened: Failed to install kruise-controller-manager

What you expected to happen: Install kruise-controller-manager successful

How to reproduce it (as minimally and precisely as possible):
kubectl apply -f https://raw.githubusercontent.com/kruiseio/kruise/master/config/crds/apps_v1alpha1_broadcastjob.yaml
kubectl apply -f https://raw.githubusercontent.com/kruiseio/kruise/master/config/crds/apps_v1alpha1_sidecarset.yaml
kubectl apply -f https://raw.githubusercontent.com/kruiseio/kruise/master/config/crds/apps_v1alpha1_statefulset.yaml

kubectl apply -f https://raw.githubusercontent.com/kruiseio/kruise/master/config/manager/all_in_one.yaml

Anything else we need to know?:

Environment:

  • Kruise version:latest version from github
  • Kubernetes version (use kubectl version):
    kubectl version
    Client Version: version.Info{Major:"1", Minor:"10", GitVersion:"v1.10.0", GitCommit:"fc32d2f3698e36b93322a3465f63a14e9f0eaead", GitTreeState:"clean", BuildDate:"2018-03-27T00:13:02Z", GoVersion:"go1.9.4", Compiler:"gc", Platform:"darwin/amd64"}
    Server Version: version.Info{Major:"1", Minor:"11", GitVersion:"v1.11.3", GitCommit:"a4529464e4629c21224b3d52edfe0ea91b072862", GitTreeState:"clean", BuildDate:"2018-09-09T17:53:03Z", GoVersion:"go1.10.3", Compiler:"gc", Platform:"linux/amd64"}
  • OS (e.g: cat /etc/os-release):MacOS mojave,Version 10.14.5 (18F132)
  • Kernel (e.g. uname -a):Darwin MAC.local 18.6.0 Darwin Kernel Version 18.6.0: Thu Apr 25 23:16:27 PDT 2019; root:xnu-4903.261.4~2/RELEASE_X86_64 x86_64
  • Install tools: minikube
  • Others:
    error message :

kubectl apply -f https://raw.githubusercontent.com/kruiseio/kruise/master/config/manager/all_in_one.yaml
namespace "kruise-system" created
clusterrole.rbac.authorization.k8s.io "kruise-manager-role" created
mutatingwebhookconfiguration.admissionregistration.k8s.io "kruise-mutating-webhook-configuration" created
error: error validating "https://raw.githubusercontent.com/kruiseio/kruise/master/config/manager/all_in_one.yaml": error validating data: [ValidationError(ValidatingWebhookConfiguration.webhooks[0]): unknown field "sideEffects" in io.k8s.api.admissionregistration.v1beta1.Webhook, ValidationError(ValidatingWebhookConfiguration.webhooks[1]): unknown field "sideEffects" in io.k8s.api.admissionregistration.v1beta1.Webhook, ValidationError(ValidatingWebhookConfiguration.webhooks[2]): unknown field "sideEffects" in io.k8s.api.admissionregistration.v1beta1.Webhook]; if you choose to ignore these errors, turn validation off with --validate=false

[BUG]local debugging is not successful

What happened:
Local debugging with make run command has an error.
When installing statefulset,it will request kruise-webhook-server-service,but the service not binding an endpoints,So it will connect refuesed.

What you expected to happen:Local debugging successfully

How to reproduce it (as minimally and precisely as possible):

  1. make run
  2. install all crds
  3. install kruise-system namespace
  4. install a kruise statefulset demo

Anything else we need to know?:

For debugging successfully,i try do the following:
1.remove the webhook service selector.
2. create an endpoint with the same name as the webhook service,and the endpoint subset use local ip.The endpoint will forward traffic to the local.

But there is still a problem,requesting webhook service has a certificate x509 error.

I am not very familiar with the signature,can you help me ?

Environment:

  • Kruise version: latest version from github
  • Kubernetes version (use kubectl version): v1.15.0
  • OS (e.g: cat /etc/os-release):macOS 10.14.5
  • Kernel (e.g. uname -a): Darwin Kernel Version 18.6.0
  • Install tools: minikube&&kubectl
  • Others:

[BUG] `make manager` changes source code of project

What happened:
make manager changes source code of project:

What you expected to happen:
make manager does no change to source code

How to reproduce it (as minimally and precisely as possible):

kruise (master) $ make manager
go generate ./pkg/... ./cmd/...
go fmt ./pkg/... ./cmd/...
pkg/controller/statefulset/stateful_inplace_utils_test.go
go vet ./pkg/... ./cmd/...
go build -o bin/manager github.com/openkruise/kruise/cmd/manager
kruise (master) $ git status
On branch master
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

        modified:   pkg/controller/statefulset/stateful_inplace_utils_test.go

no changes added to commit (use "git add" and/or "git commit -a")
kruise (master) $ git diff pkg/controller/statefulset/stateful_inplace_utils_test.go
diff --git a/pkg/controller/statefulset/stateful_inplace_utils_test.go b/pkg/controller/statefulset/stateful_inplace_utils_test.go
index 84017390..f2b328c2 100644
--- a/pkg/controller/statefulset/stateful_inplace_utils_test.go
+++ b/pkg/controller/statefulset/stateful_inplace_utils_test.go
@@ -136,7 +136,7 @@ func TestShouldDoInPlaceUpdate(t *testing.T) {
                        },
                },
                {
-                       name:                  "podUpdatePolicy is not InPlaceIfPossible",
+                       name: "podUpdatePolicy is not InPlaceIfPossible",
                        rollingUpdateStrategy: &appsv1alpha1.RollingUpdateStatefulSetStrategy{},
                        updateRevision: &apps.ControllerRevision{
                                Data: runtime.RawExtension{Raw: []byte(`{"spec":{"template":{"$patch":"replace","spec":{"containers":[{"name":"c1","image":"foo2"}]}}}}`)},
kruise (master) $ 

Anything else we need to know?:
none

Environment:

  • Kruise version: master node
  • Kubernetes version (use kubectl version):
  • OS (e.g: cat /etc/os-release):
  • Kernel (e.g. uname -a):
  • Install tools:
  • Others:

[doc request] specific explanation of broadcast job's authorization management

What would you like to be added:
Currently, Broadcast Job is used to control a non-long-running job on each node of k8s cluster, such as image preheat job, cleanup job and so on.

While for a job in container to finish a task on a node, it sometimes requires more authorization management. For example, how to gain privilege access on host to execute corresponding commands?

What kind of guidance can kruise provide for community end users?

Why is this needed:
Foe end users, they have no idea that whether a broadcast job can be used in every scenario due to potential authorization lack issues.

Does Kruise has Kubernetes version requirement?

I cannot run kruise-manager-controller in 1.10.5,but in 1.12.4 works well.
here is the error by kubectl logs kruise-controller-manager-0 -n kruise-system :

I0801 14:25:04.106247       1 statefulset_controller.go:184] Finished syncing statefulset "xxxx/aabb-gz01a-blue" (1.597937ms)
E0801 14:25:04.106346       1 runtime.go:69] Observed a panic: "invalid memory address or nil pointer dereference" (runtime error: invalid memory address or nil pointer dereference)
/go/src/github.com/openkruise/kruise/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go:76
/go/src/github.com/openkruise/kruise/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go:65
/go/src/github.com/openkruise/kruise/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go:51
/usr/local/go/src/runtime/asm_amd64.s:573
/usr/local/go/src/runtime/panic.go:502
/usr/local/go/src/runtime/panic.go:63
/usr/local/go/src/runtime/signal_unix.go:388
/go/src/github.com/openkruise/kruise/pkg/controller/statefulset/stateful_set_utils.go:246
/go/src/github.com/openkruise/kruise/pkg/controller/statefulset/stateful_set_control.go:324
/go/src/github.com/openkruise/kruise/pkg/controller/statefulset/stateful_set_control.go:93
/go/src/github.com/openkruise/kruise/pkg/controller/statefulset/statefulset_controller.go:281
/go/src/github.com/openkruise/kruise/pkg/controller/statefulset/statefulset_controller.go:213
/go/src/github.com/openkruise/kruise/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:215
/go/src/github.com/openkruise/kruise/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:158
/go/src/github.com/openkruise/kruise/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:133
/go/src/github.com/openkruise/kruise/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:134
/go/src/github.com/openkruise/kruise/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:88
/usr/local/go/src/runtime/asm_amd64.s:2361
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
	panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x116c203]

goroutine 242 [running]:
github.com/openkruise/kruise/vendor/k8s.io/apimachinery/pkg/util/runtime.HandleCrash(0x0, 0x0, 0x0)
	/go/src/github.com/openkruise/kruise/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go:58 +0x107
panic(0x13142a0, 0x1ebee20)
	/usr/local/go/src/runtime/panic.go:502 +0x229
github.com/openkruise/kruise/pkg/controller/statefulset.newVersionedStatefulSetPod(0xc4201d5200, 0xc4201d5b00, 0xc420cfece0, 0x1a, 0xc420cfece0, 0x1a, 0x0, 0x0)
	/go/src/github.com/openkruise/kruise/pkg/controller/statefulset/stateful_set_utils.go:246 +0x83
github.com/openkruise/kruise/pkg/controller/statefulset.(*defaultStatefulSetControl).updateStatefulSet(0xc4203591c0, 0xc4201d4000, 0xc420639308, 0xc420639308, 0x0, 0x0, 0x0, 0x0, 0xc420e48bb0, 0x1, ...)
	/go/src/github.com/openkruise/kruise/pkg/controller/statefulset/stateful_set_control.go:324 +0x713
github.com/openkruise/kruise/pkg/controller/statefulset.(*defaultStatefulSetControl).UpdateStatefulSet(0xc4203591c0, 0xc4201d4000, 0x0, 0x0, 0x0, 0x3, 0x1ef2488)
	/go/src/github.com/openkruise/kruise/pkg/controller/statefulset/stateful_set_control.go:93 +0x184
github.com/openkruise/kruise/pkg/controller/statefulset.(*ReconcileStatefulSet).syncStatefulSet(0xc42006ebe0, 0xc420b22400, 0x0, 0x0, 0x0, 0x0, 0x0)
	/go/src/github.com/openkruise/kruise/pkg/controller/statefulset/statefulset_controller.go:281 +0x1ac
github.com/openkruise/kruise/pkg/controller/statefulset.(*ReconcileStatefulSet).Reconcile(0xc42006ebe0, 0xc420e0f4f0, 0xb, 0xc420e0f4d0, 0xf, 0x1ed3a00, 0x0, 0x0, 0x0)
	/go/src/github.com/openkruise/kruise/pkg/controller/statefulset/statefulset_controller.go:213 +0x4ff
github.com/openkruise/kruise/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem(0xc420170960, 0x0)
	/go/src/github.com/openkruise/kruise/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:215 +0x188
github.com/openkruise/kruise/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func1()
	/go/src/github.com/openkruise/kruise/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:158 +0x36
github.com/openkruise/kruise/vendor/k8s.io/apimachinery/pkg/util/wait.JitterUntil.func1(0xc4204060d0)
	/go/src/github.com/openkruise/kruise/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:133 +0x54
github.com/openkruise/kruise/vendor/k8s.io/apimachinery/pkg/util/wait.JitterUntil(0xc4204060d0, 0x3b9aca00, 0x0, 0x1, 0xc42071ce40)
	/go/src/github.com/openkruise/kruise/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:134 +0xbd
github.com/openkruise/kruise/vendor/k8s.io/apimachinery/pkg/util/wait.Until(0xc4204060d0, 0x3b9aca00, 0xc42071ce40)
	/go/src/github.com/openkruise/kruise/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:88 +0x4d
created by github.com/openkruise/kruise/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start
	/go/src/github.com/openkruise/kruise/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:157 +0x35b

[feature request] Support unknown pod rschedule

What would you like to be added:

希望 Advanced StatefulSet 能够对失联 pod 进行重新调度

Why is this needed:

传统的StatefulSet,节点失联(unknown)之后,上面的pod会变成 unknown ,这时得手动删除它才会重新调度,希望阿里云的 Advanced StatefulSet 能够修复这部分问题。

[feature request] Specific metrics is need in project file

What would you like to be added:
specift metrics list file

Why is this needed:
to learn kruise clearly

question: What metrics does kurise provide?

We can access localhost:8080 to get some metrics, but what specific metrics does kurise provide? can you list specift metrics in project docs?

[BUG] Advanced StatefulSet panic

What happened:

I0909 13:39:58.694127       1 statefulset_controller.go:279] Syncing StatefulSet default/sample with 0 pods
I0909 13:39:58.700427       1 statefulset_controller.go:184] Finished syncing statefulset "default/sample" (6.343849ms)
E0909 13:39:58.700492       1 runtime.go:69] Observed a panic: "invalid memory address or nil pointer dereference" (runtime error: invalid memory address or nil pointer dereference)
/go/src/github.com/openkruise/kruise/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go:76
/go/src/github.com/openkruise/kruise/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go:65
/go/src/github.com/openkruise/kruise/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go:51
/usr/local/go/src/runtime/asm_amd64.s:573
/usr/local/go/src/runtime/panic.go:502
/usr/local/go/src/runtime/panic.go:63
/usr/local/go/src/runtime/signal_unix.go:388
/go/src/github.com/openkruise/kruise/pkg/controller/statefulset/stateful_set_utils.go:246
/go/src/github.com/openkruise/kruise/pkg/controller/statefulset/stateful_set_control.go:324
/go/src/github.com/openkruise/kruise/pkg/controller/statefulset/stateful_set_control.go:93
/go/src/github.com/openkruise/kruise/pkg/controller/statefulset/statefulset_controller.go:281
/go/src/github.com/openkruise/kruise/pkg/controller/statefulset/statefulset_controller.go:213
/go/src/github.com/openkruise/kruise/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:215
/go/src/github.com/openkruise/kruise/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:158
/go/src/github.com/openkruise/kruise/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:133
/go/src/github.com/openkruise/kruise/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:134
/go/src/github.com/openkruise/kruise/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:88
/usr/local/go/src/runtime/asm_amd64.s:2361
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
        panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x116d2d3]

goroutine 243 [running]:
github.com/openkruise/kruise/vendor/k8s.io/apimachinery/pkg/util/runtime.HandleCrash(0x0, 0x0, 0x0)
        /go/src/github.com/openkruise/kruise/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go:58 +0x107
panic(0x13155a0, 0x1ec0e20)
        /usr/local/go/src/runtime/panic.go:502 +0x229
github.com/openkruise/kruise/pkg/controller/statefulset.newVersionedStatefulSetPod(0xc420cdad80, 0xc420cdbb00, 0xc4206b8100, 0x11, 0xc4206b8100, 0x11, 0x0, 0x9)
        /go/src/github.com/openkruise/kruise/pkg/controller/statefulset/stateful_set_utils.go:246 +0x83
github.com/openkruise/kruise/pkg/controller/statefulset.(*defaultStatefulSetControl).updateStatefulSet(0xc420791f80, 0xc4204f1680, 0xc4200ecf00, 0xc4200ecf00, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
        /go/src/github.com/openkruise/kruise/pkg/controller/statefulset/stateful_set_control.go:324 +0x713
github.com/openkruise/kruise/pkg/controller/statefulset.(*defaultStatefulSetControl).UpdateStatefulSet(0xc420791f80, 0xc4204f1680, 0x0, 0x0, 0x0, 0x3, 0x1ef4488)
        /go/src/github.com/openkruise/kruise/pkg/controller/statefulset/stateful_set_control.go:93 +0x184
github.com/openkruise/kruise/pkg/controller/statefulset.(*ReconcileStatefulSet).syncStatefulSet(0xc420796550, 0xc4204f0900, 0x0, 0x0, 0x0, 0x0, 0x0)
        /go/src/github.com/openkruise/kruise/pkg/controller/statefulset/statefulset_controller.go:281 +0x1ac
github.com/openkruise/kruise/pkg/controller/statefulset.(*ReconcileStatefulSet).Reconcile(0xc420796550, 0xc4206e86e0, 0x7, 0xc4206e8630, 0x6, 0x1ed5a00, 0x0, 0x0, 0x0)
        /go/src/github.com/openkruise/kruise/pkg/controller/statefulset/statefulset_controller.go:213 +0x4ff
github.com/openkruise/kruise/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem(0xc4202846e0, 0x0)
        /go/src/github.com/openkruise/kruise/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:215 +0x188
github.com/openkruise/kruise/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func1()
        /go/src/github.com/openkruise/kruise/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:158 +0x36
github.com/openkruise/kruise/vendor/k8s.io/apimachinery/pkg/util/wait.JitterUntil.func1(0xc42039d070)
        /go/src/github.com/openkruise/kruise/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:133 +0x54
github.com/openkruise/kruise/vendor/k8s.io/apimachinery/pkg/util/wait.JitterUntil(0xc42039d070, 0x3b9aca00, 0x0, 0x20bd00000001, 0xc420776960)
        /go/src/github.com/openkruise/kruise/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:134 +0xbd
github.com/openkruise/kruise/vendor/k8s.io/apimachinery/pkg/util/wait.Until(0xc42039d070, 0x3b9aca00, 0xc420776960)
        /go/src/github.com/openkruise/kruise/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:88 +0x4d
created by github.com/openkruise/kruise/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start
        /go/src/github.com/openkruise/kruise/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:157 +0x35b

What you expected to happen:
create an advenced statefulset

How to reproduce it (as minimally and precisely as possible):
kubectl apply -f guestbook-sts-for-sidecar-demo.yaml

Anything else we need to know?:

Environment:

  • Kruise version: 1.12
  • Kubernetes version (use kubectl version):
  • OS (e.g: cat /etc/os-release):
  • Kernel (e.g. uname -a):
  • Install tools:
  • Others:

[BUG]log always print "Watch close"

What happened:
deploy kruise in my k8s cluster, create statefulsets.apps.kruise.io app work ok, and the app pod is running, but the kruise controller manager frequently print "watch close" logs . is it normal?

# kubectl logs -f kruise-controller-manager-0 -n kruise-system
I0925 13:30:24.865164       1 pod_create_handler.go:77] [sidecar inject] begin to process /
I0925 13:30:42.172745       1 reflector.go:357] sigs.k8s.io/controller-runtime/pkg/cache/internal/informers_map.go:126: Watch close - *v1.Pod total 18 items received
I0925 13:30:43.426671       1 reflector.go:357] sigs.k8s.io/controller-runtime/pkg/cache/internal/informers_map.go:196: Watch close - *v1.Secret total 0 items received
I0925 13:31:22.204516       1 reflector.go:357] sigs.k8s.io/controller-runtime/pkg/cache/internal/informers_map.go:126: Watch close - *v1.PersistentVolumeClaim total 36 items received
I0925 13:31:22.204910       1 reflector.go:357] sigs.k8s.io/controller-runtime/pkg/cache/internal/informers_map.go:126: Watch close - *v1alpha1.StatefulSet total 0 items received
I0925 13:31:33.077634       1 reflector.go:357] sigs.k8s.io/controller-runtime/pkg/cache/internal/informers_map.go:126: Watch close - *v1.Node total 628 items received
I0925 13:31:52.269176       1 reflector.go:357] sigs.k8s.io/controller-runtime/pkg/cache/internal/informers_map.go:126: Watch close - *v1alpha1.SidecarSet total 0 items received
I0925 13:33:52.406022       1 reflector.go:357] sigs.k8s.io/controller-runtime/pkg/cache/internal/informers_map.go:126: Watch close - *v1alpha1.BroadcastJob total 0 items received
I0925 13:33:52.406847       1 reflector.go:357] sigs.k8s.io/controller-runtime/pkg/cache/internal/informers_map.go:126: Watch close - *v1.ControllerRevision total 0 items received
I0925 13:34:02.413296       1 reflector.go:357] sigs.k8s.io/controller-runtime/pkg/cache/internal/informers_map.go:196: Watch close - *v1.Service total 0 items received
I0925 13:36:13.653563       1 reflector.go:357] sigs.k8s.io/controller-runtime/pkg/cache/internal/informers_map.go:196: Watch close - *v1beta1.MutatingWebhookConfiguration total 0 items received
I0925 13:37:26.181909       1 reflector.go:357] sigs.k8s.io/controller-runtime/pkg/cache/internal/informers_map.go:126: Watch close - *v1.Pod total 9 items received
I0925 13:37:26.214689       1 reflector.go:357] sigs.k8s.io/controller-runtime/pkg/cache/internal/informers_map.go:126: Watch close - *v1alpha1.StatefulSet total 0 items received
I0925 13:37:26.430959       1 reflector.go:357] sigs.k8s.io/controller-runtime/pkg/cache/internal/informers_map.go:196: Watch close - *v1.Secret total 0 items received
I0925 13:37:37.214645       1 reflector.go:357] sigs.k8s.io/controller-runtime/pkg/cache/internal/informers_map.go:126: Watch close - *v1.PersistentVolumeClaim total 0 items received

What you expected to happen:

How to reproduce it (as minimally and precisely as possible):

Anything else we need to know?:

Environment:

  • Kruise version: mastre-5bb9bd0c214225c3a232feb6eb9ab71ab333f025

  • Kubernetes version (use kubectl version):
    Client Version: version.Info{Major:"1", Minor:"11", GitVersion:"v1.11.5", GitCommit:"33b6acd980c7df292d851628dc5842042f5da9b4", GitTreeState:"archive", BuildDate:"2019-08-02T11:08:51Z", GoVersion:"go1.12.4", Compiler:"gc", Platform:"linux/amd64"}
    Server Version: version.Info{Major:"1", Minor:"11", GitVersion:"v1.11.5", GitCommit:"33b6acd980c7df292d851628dc5842042f5da9b4", GitTreeState:"archive", BuildDate:"2019-08-02T11:08:51Z", GoVersion:"go1.12.4", Compiler:"gc", Platform:"linux/amd64"}

  • OS (e.g: cat /etc/os-release): centos-7

  • Kernel (e.g. uname -a): 3.10.0-693.25.4.el7

  • Install tools:

  • Others:

[BUG] Internal error occurred: failed calling admission webhook "validating-create-update-statefulset.kruise.io"

What happened:

Error from server (InternalError): error when creating "C0072.yaml": Internal error occurred: failed calling admission webhook "validating-create-update-statefulset.kruise.io": Post https://kruise-webhook-server-service.kruise-system.svc:443/validating-create-update-statefulset?timeout=30s: x509: certificate signed by unknown authority

What you expected to happen:
success

How to reproduce it (as minimally and precisely as possible):

kubectl apply -f C0072.yaml

C0072.yaml

apiVersion: apps.kruise.io/v1alpha1
kind: StatefulSet
metadata:
  name: sales-dev
  namespace: dev
spec:
  replicas: 1
  updateStrategy:
    type: RollingUpdate
    rollingUpdate:
      # Do in-place update if possible, currently only image update is supported for in-place update
      podUpdatePolicy: InPlaceIfPossible
      # Allow parallel updates with max number of unavailable instances equals to 2
      maxUnavailable: 1
  selector:
    matchLabels:
      app: sales
  template:
    metadata:
      labels:
        app: sales
    spec:
      readinessGates:
         # A new condition that ensures the pod remains at NotReady state while the in-place update is happening
      - conditionType: InPlaceUpdateReady
      nodeSelector:
        x-kind: x
      hostname: sales-dev
      hostAliases:
      - ip: "192.18.21.165"
        hostnames:
        - "jmenv.tbsite.net"
      containers:
      - name: sales
        image: registry.cn-beijing.aliyuncs.com/xxx/dev_sales:xxxx-1.0.0-SNAPSHOT_21_20190815110622
        command:
          - "sh"
          - "-c"
          - >
            /home/admin/taobao-tomcat/bin/catalina.sh run
        imagePullPolicy: Always

Anything else we need to know?:


# install commands:

kubectl apply -f https://raw.githubusercontent.com/kruiseio/kruise/master/config/crds/apps_v1alpha1_statefulset.yaml

kubectl apply -f https://raw.githubusercontent.com/kruiseio/kruise/master/config/crds/apps_v1alpha1_broadcastjob.yaml
kubectl apply -f https://raw.githubusercontent.com/kruiseio/kruise/master/config/crds/apps_v1alpha1_sidecarset.yaml

kubectl apply -f https://raw.githubusercontent.com/kruiseio/kruise/master/config/manager/all_in_one.yaml



kubectl get pods -n kruise-system               
NAME                          READY   STATUS    RESTARTS   AGE
kruise-controller-manager-0   1/1     Running   1          25m


kubectl get svc -n kruise-system
NAME                                TYPE        CLUSTER-IP   EXTERNAL-IP   PORT(S)   AGE
kruise-controller-manager-service   ClusterIP   10.0.0.64    <none>        443/TCP   33m
kruise-webhook-server-service       ClusterIP   10.0.0.163   <none>        443/TCP   31m

Environment:

  • Kruise version: apiextensions.k8s.io/v1beta1

  • Kubernetes version (use kubectl version):
    v1.14.0

  • OS (e.g: cat /etc/os-release):
    CentOS-7

  • Kernel (e.g. uname -a):
    Linux iz2ze68b0694wpwcn9mcvjz 3.10.0-693.21.1.el7.x86_64 #1 SMP Wed Mar 7 19:03:37 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

  • Install tools:

  • Others:

[goreport] goreport issues of project kruise

What would you like to be added:
We add a bar of goreport to check the go code quality of project kruise.
16_25_42__07_11_2019

And after we click the button, we could find the code report was not so good. Here is the report: https://goreportcard.com/report/github.com/openkruise/kruise

We should fix all these problems and make go code much better.

In addition, do we need to add a rule that the gocyclo of kruise shoule be less than a fixed number? @jian-he @xiang90 @FillZpp

Why is this needed:
Code quality is quite important.

[BUG]

What happened:
部署kruise-controller-manager-0报错(内存空指针)
image

What you expected to happen:

How to reproduce it (as minimally and precisely as possible):

Anything else we need to know?:

Environment:

  • Kruise version:

  • Kubernetes version (use kubectl version):
    image

  • OS (e.g: cat /etc/os-release):

  • Kernel (e.g. uname -a):

  • Install tools:

  • Others:

[Issue] Pod ip is changed ?

before:
[root@k8s-master kruise]# kubectl get pods -owide
NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES
sample-0 1/1 Running 0 5m20s 10.244.1.113 k8s-node1 1/1
sample-1 1/1 Running 0 5m37s 10.244.1.111 k8s-node1 1/1
sample-2 1/1 Running 0 5m37s 10.244.1.112 k8s-node1 1/1

[root@k8s-master kruise]# kubectl get pod sample-0 -oyaml
apiVersion: v1
kind: Pod
metadata:
creationTimestamp: "2019-09-09T12:26:51Z"
generateName: sample-
labels:
app: sample
controller-revision-hash: sample-55d9756b4
statefulset.kubernetes.io/pod-name: sample-0
name: sample-0
namespace: default
ownerReferences:

  • apiVersion: apps.kruise.io/v1alpha1
    blockOwnerDeletion: true
    controller: true
    kind: StatefulSet
    name: sample
    uid: ea7a8c04-d2ed-11e9-860a-000c29e1052e
    resourceVersion: "1247700"
    selfLink: /api/v1/namespaces/default/pods/sample-0
    uid: 1a070092-d2fd-11e9-860a-000c29e1052e
    spec:
    containers:
  • image: nginx:latest
    imagePullPolicy: Always
    name: main
    resources: {}
    terminationMessagePath: /dev/termination-log
    terminationMessagePolicy: File
    volumeMounts:
    • mountPath: /var/run/secrets/kubernetes.io/serviceaccount
      name: default-token-wplr9
      readOnly: true
      dnsPolicy: ClusterFirst
      enableServiceLinks: true
      hostname: sample-0
      nodeName: k8s-node1
      priority: 0
      readinessGates:
  • conditionType: InPlaceUpdateReady
    restartPolicy: Always
    schedulerName: default-scheduler
    securityContext: {}
    serviceAccount: default
    serviceAccountName: default
    subdomain: fake-service
    terminationGracePeriodSeconds: 30
    tolerations:
  • effect: NoExecute
    key: node.kubernetes.io/not-ready
    operator: Exists
    tolerationSeconds: 300
  • effect: NoExecute
    key: node.kubernetes.io/unreachable
    operator: Exists
    tolerationSeconds: 300
    volumes:
  • name: default-token-wplr9
    secret:
    defaultMode: 420
    secretName: default-token-wplr9
    status:
    conditions:
  • lastProbeTime: null
    lastTransitionTime: null
    status: "True"
    type: InPlaceUpdateReady
  • lastProbeTime: null
    lastTransitionTime: "2019-09-09T12:26:51Z"
    status: "True"
    type: Initialized
  • lastProbeTime: null
    lastTransitionTime: "2019-09-09T12:26:54Z"
    status: "True"
    type: Ready
  • lastProbeTime: null
    lastTransitionTime: "2019-09-09T12:26:54Z"
    status: "True"
    type: ContainersReady
  • lastProbeTime: null
    lastTransitionTime: "2019-09-09T12:26:51Z"
    status: "True"
    type: PodScheduled
    containerStatuses:
  • containerID: docker://216437085a3dabc4ec6a5d0db6c1b0e8d77759d61a11f85154a218c91e990714
    image: nginx:latest
    imageID: docker-pullable://nginx@sha256:53ddb41e46de3d63376579acf46f9a41a8d7de33645db47a486de9769201fec9
    lastState: {}
    name: main
    ready: true
    restartCount: 0
    state:
    running:
    startedAt: "2019-09-09T12:26:53Z"
    hostIP: 192.168.24.138
    phase: Running
    podIP: 10.244.1.113
    qosClass: BestEffort
    startTime: "2019-09-09T12:26:51Z"

after:

[root@k8s-master kruise]# kubectl get pods -owide
NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES
sample-0 1/1 Running 0 4s 10.244.1.116 k8s-node1 1/1
sample-1 1/1 Running 0 14s 10.244.1.114 k8s-node1 1/1
sample-2 1/1 Running 0 14s 10.244.1.115 k8s-node1 1/1

[root@k8s-master kruise]# kubectl get pod sample-0 -oyaml
apiVersion: v1
kind: Pod
metadata:
creationTimestamp: "2019-09-09T12:36:11Z"
generateName: sample-
labels:
app: sample
controller-revision-hash: sample-588f7cf4d6
statefulset.kubernetes.io/pod-name: sample-0
name: sample-0
namespace: default
ownerReferences:

  • apiVersion: apps.kruise.io/v1alpha1
    blockOwnerDeletion: true
    controller: true
    kind: StatefulSet
    name: sample
    uid: ea7a8c04-d2ed-11e9-860a-000c29e1052e
    resourceVersion: "1248512"
    selfLink: /api/v1/namespaces/default/pods/sample-0
    uid: 67d1af77-d2fe-11e9-860a-000c29e1052e
    spec:
    containers:
  • image: nginx:alpine
    imagePullPolicy: IfNotPresent
    name: main
    resources: {}
    terminationMessagePath: /dev/termination-log
    terminationMessagePolicy: File
    volumeMounts:
    • mountPath: /var/run/secrets/kubernetes.io/serviceaccount
      name: default-token-wplr9
      readOnly: true
      dnsPolicy: ClusterFirst
      enableServiceLinks: true
      hostname: sample-0
      nodeName: k8s-node1
      priority: 0
      readinessGates:
  • conditionType: InPlaceUpdateReady
    restartPolicy: Always
    schedulerName: default-scheduler
    securityContext: {}
    serviceAccount: default
    serviceAccountName: default
    subdomain: fake-service
    terminationGracePeriodSeconds: 30
    tolerations:
  • effect: NoExecute
    key: node.kubernetes.io/not-ready
    operator: Exists
    tolerationSeconds: 300
  • effect: NoExecute
    key: node.kubernetes.io/unreachable
    operator: Exists
    tolerationSeconds: 300
    volumes:
  • name: default-token-wplr9
    secret:
    defaultMode: 420
    secretName: default-token-wplr9
    status:
    conditions:
  • lastProbeTime: null
    lastTransitionTime: null
    status: "True"
    type: InPlaceUpdateReady
  • lastProbeTime: null
    lastTransitionTime: "2019-09-09T12:36:11Z"
    status: "True"
    type: Initialized
  • lastProbeTime: null
    lastTransitionTime: "2019-09-09T12:36:13Z"
    status: "True"
    type: Ready
  • lastProbeTime: null
    lastTransitionTime: "2019-09-09T12:36:13Z"
    status: "True"
    type: ContainersReady
  • lastProbeTime: null
    lastTransitionTime: "2019-09-09T12:36:11Z"
    status: "True"
    type: PodScheduled
    containerStatuses:
  • containerID: docker://ff1cf915ea37f3f0efaaa0a75c9235489c8e342cb838c67f1697a1cdbf2d2795
    image: nginx:alpine
    imageID: docker-pullable://nginx@sha256:23b4dcdf0d34d4a129755fc6f52e1c6e23bb34ea011b315d87e193033bcd1b68
    lastState: {}
    name: main
    ready: true
    restartCount: 0
    state:
    running:
    startedAt: "2019-09-09T12:36:12Z"
    hostIP: 192.168.24.138
    phase: Running
    podIP: 10.244.1.116
    qosClass: BestEffort
    startTime: "2019-09-09T12:36:11Z"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.