Skip to content

Conversation

@RolandMa1986
Copy link
Member

No description provided.

Roland.Ma added 2 commits November 25, 2020 03:49
Signed-off-by: Roland.Ma <rolandma@yunify.com>
Signed-off-by: Roland.Ma <rolandma@yunify.com>
@ks-ci-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: RolandMa1986
To complete the pull request process, please assign zryfish
You can assign the PR to them by writing /assign @zryfish in a comment when ready.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ks-ci-bot ks-ci-bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Nov 26, 2020
@RolandMa1986
Copy link
Member Author

/assign @zryfish

Copy link
Contributor

@LinuxSuRen LinuxSuRen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your quickstart. I believe it can help many contributors. I left some comments which do not block this PR.

@@ -0,0 +1,145 @@
# Controller Manager Quickstart

KubeSphere follows the [sample-controller](https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/sample-controller) pattern to implement controllers for the reconciliation process. It watches CustomResourceDefinition(CRD) desired state and actual state through informers and listers. Then, it sends instructions through clients to try and make the current state be more like the desired state.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be good if you can put the relevant links here. For example, put the official link of CustomResourceDefinition.


To implement a controller, you should define your API Groups, Versions, and Kinds firstly. Please read more about the [Kubernetes API Conventions](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#websockets-and-spdy) if you want to understand those concepts deeper.

For an example, the `Group` Kind that was defined under `iam.kubershpere.io` API Group as below:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For an example, I guess you want to say For instance here.

type Group struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Status GroupStatus `json:"status,omitempty"`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess you just missed here. Please provide a good indent code for all code lines.

@yangchuansheng yangchuansheng force-pushed the master branch 4 times, most recently from 4a41274 to a30f1e3 Compare November 29, 2022 07:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dco-signoff: yes size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants