Kubernets Plugin: Automatically have podTemplate inherit global defaults

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Kubernets Plugin: Automatically have podTemplate inherit global defaults

apeleg
My organization is using the Kubernetes plugin for Jenkins and we have dozens of Jenkinsfile's floating across each project. We recently found a use case where we would like to have each podTemplate updated across all the Jenkinsfile

Is there anyway to automatically have all those podTemplates inherit some default/global values?

I was reading https://github.com/jenkinsci/kubernetes-plugin and the best thing I could find was the `inheritFrom` key that a podTemplate could have. This would require me to modify every Jenkinsfile though and I'm hoping to avoid that if possible.

If that's my best option where do I create the template? Is it set up in the Jenkins global configuration for the K8s plugin?

Thanks,
Asaf

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/f0140e0c-762b-4067-875c-53145993c852%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Kubernets Plugin: Automatically have podTemplate inherit global defaults

Carlos Sanchez
you can setup a podtemplate as "default" in the global settings IIRC and all would inherit

On Tue, Jul 10, 2018 at 7:47 PM <[hidden email]> wrote:
My organization is using the Kubernetes plugin for Jenkins and we have dozens of Jenkinsfile's floating across each project. We recently found a use case where we would like to have each podTemplate updated across all the Jenkinsfile

Is there anyway to automatically have all those podTemplates inherit some default/global values?

I was reading https://github.com/jenkinsci/kubernetes-plugin and the best thing I could find was the `inheritFrom` key that a podTemplate could have. This would require me to modify every Jenkinsfile though and I'm hoping to avoid that if possible.

If that's my best option where do I create the template? Is it set up in the Jenkins global configuration for the K8s plugin?

Thanks,
Asaf

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/f0140e0c-762b-4067-875c-53145993c852%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CALHFn6N2EC%3Dg1h6705tw3s_n6eD8nyzTVU5hGFQTS77a-2ECQA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Kubernets Plugin: Automatically have podTemplate inherit global defaults

apeleg

So as long as the template is named "default" it doesn't matter what the label of the podTemplates are?  I guess that in the "Usage" dropdown I would choose "use this node as much as possible" ? 


From: [hidden email] <[hidden email]> on behalf of Carlos Sanchez <[hidden email]>
Sent: Tuesday, July 10, 2018 2:26:44 PM
To: Jenkins Users
Subject: Re: Kubernets Plugin: Automatically have podTemplate inherit global defaults
 
you can setup a podtemplate as "default" in the global settings IIRC and all would inherit

On Tue, Jul 10, 2018 at 7:47 PM <[hidden email]> wrote:
My organization is using the Kubernetes plugin for Jenkins and we have dozens of Jenkinsfile's floating across each project. We recently found a use case where we would like to have each podTemplate updated across all the Jenkinsfile

Is there anyway to automatically have all those podTemplates inherit some default/global values?

I was reading https://github.com/jenkinsci/kubernetes-plugin and the best thing I could find was the `inheritFrom` key that a podTemplate could have. This would require me to modify every Jenkinsfile though and I'm hoping to avoid that if possible.

If that's my best option where do I create the template? Is it set up in the Jenkins global configuration for the K8s plugin?

Thanks,
Asaf

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/f0140e0c-762b-4067-875c-53145993c852%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "Jenkins Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jenkinsci-users/1jz786Tl7BM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CALHFn6N2EC%3Dg1h6705tw3s_n6eD8nyzTVU5hGFQTS77a-2ECQA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/BN7PR04MB4033A49D1A25EFD9588AB1F3BB5B0%40BN7PR04MB4033.namprd04.prod.outlook.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Kubernets Plugin: Automatically have podTemplate inherit global defaults

Carlos Sanchez
no, there is a field "Defaults Provider Template Name"
The name of the pod template to use for providing default values. When a value is specified and there is a pod template with a matching name, the template will be used as a parent to all other pod templates.

On Tue, Jul 10, 2018 at 11:38 PM Asaf Peleg <[hidden email]> wrote:

So as long as the template is named "default" it doesn't matter what the label of the podTemplates are?  I guess that in the "Usage" dropdown I would choose "use this node as much as possible" ? 


From: [hidden email] <[hidden email]> on behalf of Carlos Sanchez <[hidden email]>
Sent: Tuesday, July 10, 2018 2:26:44 PM
To: Jenkins Users
Subject: Re: Kubernets Plugin: Automatically have podTemplate inherit global defaults
 
you can setup a podtemplate as "default" in the global settings IIRC and all would inherit

On Tue, Jul 10, 2018 at 7:47 PM <[hidden email]> wrote:
My organization is using the Kubernetes plugin for Jenkins and we have dozens of Jenkinsfile's floating across each project. We recently found a use case where we would like to have each podTemplate updated across all the Jenkinsfile

Is there anyway to automatically have all those podTemplates inherit some default/global values?

I was reading https://github.com/jenkinsci/kubernetes-plugin and the best thing I could find was the `inheritFrom` key that a podTemplate could have. This would require me to modify every Jenkinsfile though and I'm hoping to avoid that if possible.

If that's my best option where do I create the template? Is it set up in the Jenkins global configuration for the K8s plugin?

Thanks,
Asaf

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/f0140e0c-762b-4067-875c-53145993c852%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "Jenkins Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jenkinsci-users/1jz786Tl7BM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CALHFn6N2EC%3Dg1h6705tw3s_n6eD8nyzTVU5hGFQTS77a-2ECQA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/BN7PR04MB4033A49D1A25EFD9588AB1F3BB5B0%40BN7PR04MB4033.namprd04.prod.outlook.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CALHFn6Mjg-ZH7fx6%3DzP5v4vUDfc2SzMxCOoHcVfYcyadfBU_tg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.