-
Bug
-
Resolution: Unresolved
-
Minor
-
None
Scenario 0:
I have a custom pod defined on my shared-library that I usualy use for some pipelines.
pipeline{ agent { kubernetes { yaml libraryResource("kubernetes/pod/custom-pod.yaml") defaultContainer 'jnlp' } }
Result: custom-pod runs as expected.
Scenario 1:
There is a pipeline where I need to define a ephemeral-storage request. I didn't want to create another custom pod, so I wanted to resuse the custom-pod and merged the changes I needed using the inheritFrom attribute from kubernetes-plugin.
pipeline{ agent { kubernetes { inheritFrom libraryResource("kubernetes/pod/custom-pod.yaml") yaml ''' spec: containers: - name: jnlp resources: requests: ephemeral-storage: "16Gi" ''' defaultContainer 'jnlp' } }
Result: inheritFrom is ignored. instead the kubernetes default template is merged with the yaml defined.
[JENKINS-72818] inheritFrom ignored when getting pod from shared-library with libraryResource
Description |
Original:
*Scenario 0:*
I have a custom pod defined on my shared-library that I usualy use for some pipelines. {code:java} pipeline{ agent { kubernetes { yaml libraryResource("com/desigual/kubernetes/pod/custom-pod.yaml") defaultContainer 'jnlp' } } {code} Result: custom-pod runs as expected. *Scenario 1:* There is a pipeline where I need to define a ephemeral-storage request. I didn't want to create another custom pod, so I wanted to resuse the custom-pod and merged the changes I needed using the inheritFrom attribute from kubernetes-plugin. {code:java} pipeline{ agent { kubernetes { inheritFrom libraryResource("com/desigual/kubernetes/pod/custom-pod.yaml") yaml ''' spec: containers: - name: jnlp resources: requests: ephemeral-storage: "16Gi" ''' yamlMergeStrategy merge() defaultContainer 'jnlp' } }{code} Result: inheritFrom is ignored. instead the kubernetes default template is merged with the yaml defined. |
New:
*Scenario 0:*
I have a custom pod defined on my shared-library that I usualy use for some pipelines. {code:java} pipeline{ agent { kubernetes { yaml libraryResource("kubernetes/pod/custom-pod.yaml") defaultContainer 'jnlp' } } {code} Result: custom-pod runs as expected. *Scenario 1:* There is a pipeline where I need to define a ephemeral-storage request. I didn't want to create another custom pod, so I wanted to resuse the custom-pod and merged the changes I needed using the inheritFrom attribute from kubernetes-plugin. {code:java} pipeline{ agent { kubernetes { inheritFrom libraryResource("kubernetes/pod/custom-pod.yaml") yaml ''' spec: containers: - name: jnlp resources: requests: ephemeral-storage: "16Gi" ''' yamlMergeStrategy merge() defaultContainer 'jnlp' } }{code} Result: inheritFrom is ignored. instead the kubernetes default template is merged with the yaml defined. |
Description |
Original:
*Scenario 0:*
I have a custom pod defined on my shared-library that I usualy use for some pipelines. {code:java} pipeline{ agent { kubernetes { yaml libraryResource("kubernetes/pod/custom-pod.yaml") defaultContainer 'jnlp' } } {code} Result: custom-pod runs as expected. *Scenario 1:* There is a pipeline where I need to define a ephemeral-storage request. I didn't want to create another custom pod, so I wanted to resuse the custom-pod and merged the changes I needed using the inheritFrom attribute from kubernetes-plugin. {code:java} pipeline{ agent { kubernetes { inheritFrom libraryResource("kubernetes/pod/custom-pod.yaml") yaml ''' spec: containers: - name: jnlp resources: requests: ephemeral-storage: "16Gi" ''' yamlMergeStrategy merge() defaultContainer 'jnlp' } }{code} Result: inheritFrom is ignored. instead the kubernetes default template is merged with the yaml defined. |
New:
*Scenario 0:*
I have a custom pod defined on my shared-library that I usualy use for some pipelines. {code:java} pipeline{ agent { kubernetes { yaml libraryResource("kubernetes/pod/custom-pod.yaml") defaultContainer 'jnlp' } } {code} Result: custom-pod runs as expected. *Scenario 1:* There is a pipeline where I need to define a ephemeral-storage request. I didn't want to create another custom pod, so I wanted to resuse the custom-pod and merged the changes I needed using the inheritFrom attribute from kubernetes-plugin. {code:java} pipeline{ agent { kubernetes { inheritFrom libraryResource("kubernetes/pod/custom-pod.yaml") yaml ''' spec: containers: - name: jnlp resources: requests: ephemeral-storage: "16Gi" ''' defaultContainer 'jnlp' } }{code} Result: inheritFrom is ignored. instead the kubernetes default template is merged with the yaml defined. |