Seeking: Dynamic Admission Controller initializer example

111 views
Skip to first unread message

Mark Petrovic

unread,
Jul 11, 2017, 8:32:25 AM7/11/17
to Kubernetes developer/contributor discussion
Good day.  I can put one of these initializers to good use in my cluster, and wish to commence developing one immediately.  


Can someone point me to an example of a simple initializer, showing its interaction with the cluster master, so I can get an idea of how to code mine?

Many thanks.

Daniel Smith

unread,
Jul 11, 2017, 1:57:21 PM7/11/17
to Mark Petrovic, Kubernetes developer/contributor discussion
Providing a working example / walkthrough for this is very high on our (SIG API Machinery) list, but we don't have one quite yet. We made it possible last quarter, now we need to make it easy.

--
You received this message because you are subscribed to the Google Groups "Kubernetes developer/contributor discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kubernetes-dev+unsubscribe@googlegroups.com.
To post to this group, send email to kubernetes-dev@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kubernetes-dev/df1f52a8-2d7c-49e1-a656-8f32e272387e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Stefan Schimanski

unread,
Jul 11, 2017, 4:18:49 PM7/11/17
to Mark Petrovic, Kubernetes developer/contributor discussion
I have written a yet-to-be-merged CustomResourceDefinition integration test you can find here: https://github.com/kubernetes/kubernetes/pull/47252. Maybe that's helpful to get going. 


Best regards,
   Stefan

--

Clayton Coleman

unread,
Jul 11, 2017, 6:50:26 PM7/11/17
to Stefan Schimanski, Mark Petrovic, Kubernetes developer/contributor discussion
There is an initializer e2e test (but it doesn't demonstrate the initializer) here: https://github.com/kubernetes/kubernetes/blob/master/test/e2e/extension/initializers.go#L109

On Tue, Jul 11, 2017 at 4:18 PM, Stefan Schimanski <st...@redhat.com> wrote:
I have written a yet-to-be-merged CustomResourceDefinition integration test you can find here: https://github.com/kubernetes/kubernetes/pull/47252. Maybe that's helpful to get going. 


Best regards,
   Stefan

On Tue, Jul 11, 2017 at 2:32 PM, Mark Petrovic <mspet...@gmail.com> wrote:
Good day.  I can put one of these initializers to good use in my cluster, and wish to commence developing one immediately.  


Can someone point me to an example of a simple initializer, showing its interaction with the cluster master, so I can get an idea of how to code mine?

Many thanks.

--
You received this message because you are subscribed to the Google Groups "Kubernetes developer/contributor discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kubernetes-dev+unsubscribe@googlegroups.com.
To post to this group, send email to kuberne...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Kubernetes developer/contributor discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kubernetes-dev+unsubscribe@googlegroups.com.
To post to this group, send email to kubernetes-dev@googlegroups.com.

Tim Hockin

unread,
Jul 12, 2017, 4:45:41 AM7/12/17
to Clayton Coleman, Stefan Schimanski, Mark Petrovic, Kubernetes developer/contributor discussion
Yeah, having a self-contained example of registering, watching, and
responding to an initializer would be great :)
>>> email to kubernetes-de...@googlegroups.com.
>>> To post to this group, send email to kuberne...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/kubernetes-dev/df1f52a8-2d7c-49e1-a656-8f32e272387e%40googlegroups.com.
>>> For more options, visit https://groups.google.com/d/optout.
>>
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Kubernetes developer/contributor discussion" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to kubernetes-de...@googlegroups.com.
>> To post to this group, send email to kuberne...@googlegroups.com.
>> To view this discussion on the web visit
> --
> You received this message because you are subscribed to the Google Groups
> "Kubernetes developer/contributor discussion" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to kubernetes-de...@googlegroups.com.
> To post to this group, send email to kuberne...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/kubernetes-dev/CAH16ShJB9RXN9y-W65ZjrwqrP%3DCXK6P8Z5Rk7eUBKPoYj2eBFg%40mail.gmail.com.

Clayton Coleman

unread,
Jul 12, 2017, 9:34:04 AM7/12/17
to Tim Hockin, Stefan Schimanski, Mark Petrovic, Kubernetes developer/contributor discussion
Yes it would :)

lu...@luxaslabs.com

unread,
Jul 13, 2017, 5:36:46 AM7/13/17
to Kubernetes developer/contributor discussion, tho...@google.com, st...@redhat.com, mspet...@gmail.com, kelsey.h...@gmail.com
I heard Kelsey is working on this for Istio ;)

cc'd Kelsey now

Clayton Coleman

unread,
Jul 13, 2017, 9:27:36 AM7/13/17
to lu...@luxaslabs.com, Kubernetes developer/contributor discussion, tho...@google.com, st...@redhat.com, mspet...@gmail.com, kelsey.h...@gmail.com
I was considering adding a useful example - one that adds a CA to a service account secret automatically, for example.  Might be a few days

Andy Goldstein

unread,
Jul 13, 2017, 9:38:02 AM7/13/17
to Clayton Coleman, lu...@luxaslabs.com, Kubernetes developer/contributor discussion, tho...@google.com, st...@redhat.com, mspet...@gmail.com, kelsey.h...@gmail.com
There is also this PR that is currently in development to use an controller + initializer for persistent volume labeling: https://github.com/kubernetes/kubernetes/pull/44680.

To unsubscribe from this group and stop receiving emails from it, send an email to kubernetes-dev+unsubscribe@googlegroups.com.
To post to this group, send email to kubernetes-dev@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Kubernetes developer/contributor discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kubernetes-dev+unsubscribe@googlegroups.com.
To post to this group, send email to kubernetes-dev@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kubernetes-dev/-193427072741589715%40unknownmsgid.
Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages