Giter Site home page Giter Site logo

Comments (27)

sttts avatar sttts commented on July 17, 2024 12

@devdattakulkarni would you mind to contribute the figure from your blog to the controller sample README?

controllers

from sample-controller.

devdattakulkarni avatar devdattakulkarni commented on July 17, 2024 8

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

nikhita avatar nikhita commented on July 17, 2024 7

We can probably mention something like this in the README. 👍

/cc @sttts @munnerz

from sample-controller.

vncntvandriessche avatar vncntvandriessche commented on July 17, 2024

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

devdattakulkarni avatar devdattakulkarni commented on July 17, 2024

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

sttts avatar sttts commented on July 17, 2024

@devdattakulkarni 👍, just create a PR against the README in the main kubernetes repo.

from sample-controller.

devdattakulkarni avatar devdattakulkarni commented on July 17, 2024

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

nikhita avatar nikhita commented on July 17, 2024

@devdattakulkarni This one: https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/sample-controller/README.md. :)

from sample-controller.

vncntvandriessche avatar vncntvandriessche commented on July 17, 2024

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

devdattakulkarni avatar devdattakulkarni commented on July 17, 2024

@nikhita Thanks :)

@sttts kubernetes/kubernetes#62563

@vncntvandriessche :)

from sample-controller.

devdattakulkarni avatar devdattakulkarni commented on July 17, 2024

@sttts @nikhita The PR kubernetes/kubernetes#62563 has passed all the tests. Let me know if anything else is required.

from sample-controller.

barry8schneider avatar barry8schneider commented on July 17, 2024

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.

vncntvandriessche avatar vncntvandriessche commented on July 17, 2024

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

esnunes avatar esnunes commented on July 17, 2024

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.

vncntvandriessche avatar vncntvandriessche commented on July 17, 2024

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

esnunes avatar esnunes commented on July 17, 2024

@vncntvandriessche sorry, it is manually created. I was just wondering what is the reason why it is not generated automatically.

from sample-controller.

vncntvandriessche avatar vncntvandriessche commented on July 17, 2024

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

nikhita avatar nikhita commented on July 17, 2024

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.

nikhita avatar nikhita commented on July 17, 2024

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.

sttts avatar sttts commented on July 17, 2024

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.

devdattakulkarni avatar devdattakulkarni commented on July 17, 2024

@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:

cloud-ark/kubeplus#14

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.

cmoulliard avatar cmoulliard commented on July 17, 2024

This is how far I've gotten

Have you created a github repo containing your code + instructions ? @vncntvandriessche

from sample-controller.

vncntvandriessche avatar vncntvandriessche commented on July 17, 2024

@cmoulliard I'm afraid not, if I get around to it, I'll give a nudge here!

from sample-controller.

fejta-bot avatar fejta-bot commented on July 17, 2024

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.

fejta-bot avatar fejta-bot commented on July 17, 2024

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.

fejta-bot avatar fejta-bot commented on July 17, 2024

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.

k8s-ci-robot avatar k8s-ci-robot commented on July 17, 2024

@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)

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.