Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions internal/controllers/supergraphschema_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -547,8 +547,6 @@ func (r *SuperGraphSchemaReconciler) createReconciler(ctx context.Context, schem

template.Annotations["apollo-controller/spec-version"] = fmt.Sprintf("%d", schema.Generation)
template.Annotations["apollo-controller/subgraphs-checksum"] = checksum

restartPolicy := corev1.ContainerRestartPolicyOnFailure
containers := []corev1.Container{
{
Name: "supergraph-composer",
Expand All @@ -557,8 +555,7 @@ func (r *SuperGraphSchemaReconciler) createReconciler(ctx context.Context, schem
"-c",
"supergraph compose /supergraph/supergraph.yaml > /output/schema.graphql",
},
RestartPolicy: &restartPolicy,
Image: r.DefaultSuperGraphImage,
Image: r.DefaultSuperGraphImage,
VolumeMounts: []corev1.VolumeMount{
{
Name: "supergraph-config",
Expand Down Expand Up @@ -604,7 +601,7 @@ func (r *SuperGraphSchemaReconciler) createReconciler(ctx context.Context, schem
return schema, ctrl.Result{}, err
}

template.Spec.RestartPolicy = corev1.RestartPolicyAlways
template.Spec.RestartPolicy = corev1.RestartPolicyOnFailure
template.Spec.Containers = containers
template.Spec.Volumes = append(template.Spec.Volumes,
corev1.Volume{
Expand Down
Loading