Skip to content

Commit 561a872

Browse files
committed
Add DevfileOptions to GetPodTemplateSpec
1 parent bd4a12f commit 561a872

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pkg/devfile/generator/generators.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,7 @@ func GetDeployment(devfileObj parser.DevfileObj, deployParams DeploymentParams)
238238
// PodTemplateParams is a struct that contains the required data to create a podtemplatespec object
239239
type PodTemplateParams struct {
240240
ObjectMeta metav1.ObjectMeta
241+
options common.DevfileOptions
241242
// PodSecurityAdmissionPolicy is the policy to be respected by the created pod
242243
// The pod will be patched, if necessary, to respect the policies
243244
PodSecurityAdmissionPolicy psaapi.Policy
@@ -249,8 +250,9 @@ type PodTemplateParams struct {
249250
// - gets the init container for every preStart devfile event
250251
// - patches the pod template and containers to satisfy PodSecurityAdmissionPolicy
251252
// - patches the pod template and containers to apply pod and container overrides
253+
// The containers included in the podTemplateSpec can be filtered using podTemplateParams.options
252254
func GetPodTemplateSpec(devfileObj parser.DevfileObj, podTemplateParams PodTemplateParams) (*corev1.PodTemplateSpec, error) {
253-
containers, err := GetContainers(devfileObj, common.DevfileOptions{})
255+
containers, err := GetContainers(devfileObj, podTemplateParams.options)
254256
if err != nil {
255257
return nil, err
256258
}

0 commit comments

Comments
 (0)