PodSpec support in environment builder (#1369)
This commit is contained in:
committed by
Ta-Ching Chen
parent
3b6749dce9
commit
e1a64dd0c1
@@ -489,6 +489,17 @@ func (envw *environmentWatcher) createBuilderDeployment(env *fv1.Environment, ns
|
||||
return nil, err
|
||||
}
|
||||
|
||||
podSpec := apiv1.PodSpec{
|
||||
Containers: []apiv1.Container{*container},
|
||||
ServiceAccountName: "fission-builder",
|
||||
}
|
||||
|
||||
finalPodSpec, err := util.MergePodSpec(&podSpec, env.Spec.Builder.PodSpec)
|
||||
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
deployment := &appsv1.Deployment{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Namespace: ns,
|
||||
@@ -505,10 +516,7 @@ func (envw *environmentWatcher) createBuilderDeployment(env *fv1.Environment, ns
|
||||
Labels: sel,
|
||||
Annotations: podAnnotations,
|
||||
},
|
||||
Spec: apiv1.PodSpec{
|
||||
Containers: []apiv1.Container{*container},
|
||||
ServiceAccountName: "fission-builder",
|
||||
},
|
||||
Spec: *finalPodSpec,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user