Comments (27)
@devdattakulkarni would you mind to contribute the figure from your blog to the controller sample README?
from sample-controller.
@vncntvandriessche Good writeup.
I have recently written an article that explains under-the-hood details of the client-go machinery.
Check it out here:
https://medium.com/@cloudark/kubernetes-custom-controllers-b6c7d0668fdf
Hopefully it helps!
@nikhita: Would be interested in your thoughts about the article as well.
from sample-controller.
We can probably mention something like this in the README. 👍
from sample-controller.
@nikhita Is there any resource/channel/... you'd suggest gathering information to continue from the point where I stopped in the above document? This is where it gets very hard for me. At least, it is if I want to follow the examples provided.
from sample-controller.
@sttts I would be happy to contribute the figure. And if required the write-up too. Let me know the process. Should I just open a PR with modifications to the README? Also, is there any specific directory to put the figure and then link its path in the README?
from sample-controller.
@devdattakulkarni 👍, just create a PR against the README in the main kubernetes repo.
from sample-controller.
@sttts Cool. Will do that.
One more question -- when you say README in main kubernetes repo, do you mean:
https://github.com/kubernetes/kubernetes
or you mean:
https://github.com/kubernetes/sample-controller
from sample-controller.
@devdattakulkarni This one: https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/sample-controller/README.md. :)
from sample-controller.
@devdattakulkarni Thanks for sharing the article. I read it and it provides a lot of insights I was still missing.
I'll start hacking soon thanks to your help!
from sample-controller.
@nikhita Thanks :)
@sttts kubernetes/kubernetes#62563
from sample-controller.
@sttts @nikhita The PR kubernetes/kubernetes#62563 has passed all the tests. Let me know if anything else is required.
from sample-controller.
I am confused by this section. would you please clarify?
k8s.io/sample-controller/pkg/client k8s.io/sample-controller/pkg/apis
Should be swapped by your projects' "apis"-folder location.
samplecontroller:v1alpha1 should be edited into yoursamplecontroller.com:youversion
from sample-controller.
@barry-schneider Those lines just ensure no one forgets to change yoursamplecontroller.com
and the version set in your custom resource is what you've set it to be.
These are parameters you can choose for yourself and should be changed everywhere once customised.
from sample-controller.
Do you know why we need to manually create the pkg/apis/samplecontroller/v1alpha1/register.go
file. The generator depends on Resource
func, looks like this code could be generate automatically too. Is there a reason not to automatically generate it?
from sample-controller.
@esnunes If it's generated automatically I've been mistaken. I think it would be better to let the generator handle everything it can, to prevent manual errors...
from sample-controller.
@vncntvandriessche sorry, it is manually created. I was just wondering what is the reason why it is not generated automatically.
from sample-controller.
@esnunes Ah, I understand. To me it sounds like a good point. I think it actually could be generated, as all info that's required seems to be available from the custom resource?
from sample-controller.
https://github.com/kubernetes/sample-controller/blob/master/docs/controller-client-go.md explains the reasoning but I guess we still need documentation in a "steps form". Step 1,.. Step 2,...
from sample-controller.
I think it actually could be generated, as all info that's required seems to be available from the custom resource?
@sttts Wdyt about generating register.go
too?
from sample-controller.
We probably could. We might need some more tags (which are the runtime.Object
types to register in the scheme?). Also, aren't there small differences depending on whether you have custom conversions or defaulters?
from sample-controller.
@nikhita: Recently I had created a list of steps to serve as a quick reference of all the things that need to be done to create a custom controller. There are available here:
Were you thinking something along these lines?
Currently the explanation on the steps is sparse but that can be fixed. If you think this might be useful, I will be happy to contribute the steps.
from sample-controller.
This is how far I've gotten
Have you created a github repo containing your code + instructions ? @vncntvandriessche
from sample-controller.
@cmoulliard I'm afraid not, if I get around to it, I'll give a nudge here!
from sample-controller.
Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale
.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close
.
Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale
from sample-controller.
Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten
.
Rotten issues close after an additional 30d of inactivity.
If this issue is safe to close now please do so with /close
.
Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle rotten
from sample-controller.
Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen
.
Mark the issue as fresh with /remove-lifecycle rotten
.
Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/close
from sample-controller.
@fejta-bot: Closing this issue.
In response to this:
Rotten issues close after 30d of inactivity.
Reopen the issue with/reopen
.
Mark the issue as fresh with/remove-lifecycle rotten
.Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/close
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
from sample-controller.
Related Issues (20)
- fooLister not achive FooLister interface
- SharedInformer UpdateFunc triggers while Updating status HOT 4
- Got SECURITY ERROR when downloading k8s.io/client-go HOT 6
- Move CRD from `v1beta1` to `v1` HOT 3
- README is wrong on generating code when using Go modules HOT 5
- Please give a more detail readme, there are too many pitfall HOT 8
- `./hack/update-codegen.sh` fails on pristine checkout HOT 4
- go build with error sf.IsExported undefined HOT 8
- [enhancement] Move the code generator logic to a dockerfile HOT 2
- Generate the code with update-codegen.sh in a wrong path HOT 5
- Documentation error: example CRD already exists while trying to apply manually HOT 5
- How is the Deep Copy files are generated ? HOT 5
- Why has not the NewController use a leader election like leaderelection? HOT 4
- 无法执行生成 HOT 8
- How are the files crd.yaml and crd-status-subresource. yaml generated HOT 4
- State of the docs? HOT 4
- Why does fooInformer not register a delete event handling handler?
- code is not generated to correct dir HOT 4
- code generator errors HOT 6
- Some optimization suggestions for code generators HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sample-controller.