-
Notifications
You must be signed in to change notification settings - Fork 16.9k
[stable/jenkins] Add support for custom pod templates #21671
Conversation
Signed-off-by: Luis Garnica Guilarte <luisgarnica42@gmail.com>
Hi @lgg42. Thanks for your PR. I'm waiting for a helm member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
stable/jenkins/README.md
Outdated
@@ -189,6 +189,7 @@ The following tables list the configurable parameters of the Jenkins chart and t | |||
| `serviceAccountAgent.name` | name of the agent ServiceAccount to be used by access-controlled resources | autogenerated | | |||
| `serviceAccountAgent.create` | Configures if an agent ServiceAccount with this name should be created | `false` | | |||
| `serviceAccountAgent.annotations` | Configures annotation for the agent ServiceAccount | `{}` | | |||
| `podTemplates` | Configures extra pod templates for the default kubernetes cloud | `{}` | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about putting this under master.JCasC.podTemplates
so all the JCasC config values would be grouped together. Another option could be to put it in the agent section as podTemplates
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also think is a nice change. I left a comment in your PR. I think maybe your PR is the one to go. Let's see how we manage to get this feature working the best possible way. I'm on hold (on committing) until we find common ground 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change done to agent.podTemplates
as we talked in your PR.
Signed-off-by: Luis Garnica Guilarte <luisgarnica42@gmail.com>
b19f81f
to
333518b
Compare
/assign @mogaal |
@lgg42 Turns out I'll be able to leverage
|
Signed-off-by: Luis Garnica Guilarte <luisgarnica42@gmail.com>
… into support-pod-templates Signed-off-by: Luis Garnica Guilarte <luisgarnica42@gmail.com>
Amazing!!! 💪 |
Can't wait for this to be merged! Have been looking for this! Another JenkinsX user here. |
… into support-pod-templates Signed-off-by: Luis Garnica Guilarte <luisgarnica42@gmail.com>
… into support-pod-templates Signed-off-by: Luis Garnica Guilarte <luisgarnica42@gmail.com>
ddbd988
to
98ac6c3
Compare
``` | ||
agent: | ||
podTemplates: | ||
python: | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI. I noticed the JenkinsX values file doesn't use multi-line strings. As it turns out, having this be a multi-line string (and not calling toYaml
in the template) actually provides additional flexibility and allows for passing in a block of templating.
agent:
podTemplates:
agents: |-
{{- /* save chart agent as `set` modifies the input dictionary */}}
{{- $rootAgent := .Values.agent }}
{{- /* each additional agent inherits from $rootAgent */}}
{{- range .Values.additionalAgents }}
{{- include "jenkins.casc.podTemplate" (set $ "Values" (set $.Values "agent" (merge . $rootAgent))) }}
{{- end }}
{{- /* restore chart agent */}}
{{- $_ := set .Values "agent" $rootAgent }}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm glad you pointed me this out and resulted to be a good thing. I just followed examples from other parts of this chart.
So, does it looks already ok to test to you?
It's my first contribution here, how long does this process tend to take?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me. I have just some minor remarks - see inline comments.
Could you do me a favor and add defaultConfig: true
in ci/casc-values.yaml
. I think it"s time to check these setting as part of the build.
… into support-pod-templates Signed-off-by: Luis Garnica Guilarte <luisgarnica42@gmail.com>
… into support-pod-templates Signed-off-by: Luis Garnica Guilarte <luisgarnica42@gmail.com>
@torstenwalter thanks for your change comments! all resolved. I also added the line you requested in |
/ok-to-test |
/retest |
1 similar comment
/retest |
CI's failing with
Is this something I could fix from my part? |
/retest |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: lgg42, torstenwalter The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@lgg42 Thanks a lot for the PR. |
Thank you all for allowing this PR go through! |
* [stable/jenkins] Add support for custom pod templates Signed-off-by: Luis Garnica Guilarte <luisgarnica42@gmail.com> * [stable/jenkins] change value name to agent.podTemplates Signed-off-by: Luis Garnica Guilarte <luisgarnica42@gmail.com> * [stable/jenkins] change value name to agent.podTemplates Signed-off-by: Luis Garnica Guilarte <luisgarnica42@gmail.com>
* [stable/jenkins] Add support for custom pod templates Signed-off-by: Luis Garnica Guilarte <luisgarnica42@gmail.com> * [stable/jenkins] change value name to agent.podTemplates Signed-off-by: Luis Garnica Guilarte <luisgarnica42@gmail.com> * [stable/jenkins] change value name to agent.podTemplates Signed-off-by: Luis Garnica Guilarte <luisgarnica42@gmail.com>
* [stable/jenkins] Add support for custom pod templates Signed-off-by: Luis Garnica Guilarte <luisgarnica42@gmail.com> * [stable/jenkins] change value name to agent.podTemplates Signed-off-by: Luis Garnica Guilarte <luisgarnica42@gmail.com> * [stable/jenkins] change value name to agent.podTemplates Signed-off-by: Luis Garnica Guilarte <luisgarnica42@gmail.com> Signed-off-by: Adrien Loiseau <adrien.loiseau@logic-immo.com>
* [stable/jenkins] Add support for custom pod templates Signed-off-by: Luis Garnica Guilarte <luisgarnica42@gmail.com> * [stable/jenkins] change value name to agent.podTemplates Signed-off-by: Luis Garnica Guilarte <luisgarnica42@gmail.com> * [stable/jenkins] change value name to agent.podTemplates Signed-off-by: Luis Garnica Guilarte <luisgarnica42@gmail.com> Signed-off-by: Miguel Mingorance <miguel.mingorance@deliveryhero.com>
* [stable/jenkins] Add support for custom pod templates Signed-off-by: Luis Garnica Guilarte <luisgarnica42@gmail.com> * [stable/jenkins] change value name to agent.podTemplates Signed-off-by: Luis Garnica Guilarte <luisgarnica42@gmail.com> * [stable/jenkins] change value name to agent.podTemplates Signed-off-by: Luis Garnica Guilarte <luisgarnica42@gmail.com>
Signed-off-by: Luis Garnica Guilarte luisgarnica42@gmail.com
Is this a new chart
No.
What this PR does / why we need it:
This PR allows to configure additional pod templates in the default kubernetes cloud.
We want to configure from scratch custom pod templates the same way we do with all the settings using JCasC.
Which issue this PR fixes
(optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close that issue when PR gets merged)Special notes for your reviewer:
Checklist
[Place an '[x]' (no spaces) in all applicable fields. Please remove unrelated fields.]
[stable/mychartname]
)