add imagePullSecret to function spec
@@ -35,6 +35,7 @@ type FunctionSpec struct {
SecurityContext *corev1.SecurityContext `json:"securityContext,omitempty" protobuf:"bytes,15,opt,name=securityContext"`
VolumeMounts []corev1.VolumeMount `json:"volumeMounts,omitempty" patchStrategy:"merge" patchMergeKey:"mountPath" protobuf:"bytes,9,rep,name=volumeMounts"`
Volumes []corev1.Volume `json:"volumes,omitempty" patchStrategy:"merge,retainKeys" patchMergeKey:"name" protobuf:"bytes,1,rep,name=volumes"`
+ ImagePullSecrets []corev1.ImagePullSecrets `json:"imagePullSecrets,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,15,rep,name=imagePullSecrets"`
}
type FunctionValidation struct {
@@ -292,6 +293,7 @@ func (c *Controller) newBatchJob(fi *v1alpha1.IBFunctionInvocation, function *Fu
RestartPolicy: "Never",
TerminationGracePeriodSeconds: &zero64,
Volumes: function.Spec.Volumes,
+ ImagePullSecrets: function.Spec.ImagePullSecrets,
},
ObjectMeta: metav1.ObjectMeta{
Labels: map[string]string{
