Adds restart annotations on ig pods
@@ -21,6 +21,7 @@ import (
"code.cloudfoundry.org/quarks-operator/pkg/bosh/bpmconverter"
bdm "code.cloudfoundry.org/quarks-operator/pkg/bosh/manifest"
bdv1 "code.cloudfoundry.org/quarks-operator/pkg/kube/apis/boshdeployment/v1alpha1"
+ "code.cloudfoundry.org/quarks-operator/pkg/kube/controllers/quarksrestart"
"code.cloudfoundry.org/quarks-operator/pkg/kube/util/boshdns"
"code.cloudfoundry.org/quarks-operator/pkg/kube/util/mutate"
"code.cloudfoundry.org/quarks-operator/pkg/kube/util/names"
@@ -262,6 +263,11 @@ func (r *ReconcileBPM) deployInstanceGroups(ctx context.Context, bdpl *bdv1.BOSH
}
for _, qSts := range resources.InstanceGroups {
+ // Automatically restart instance groups if any of the secret changes
+ annotations := qSts.Spec.Template.Annotations
+ annotations[quarksrestart.AnnotationRestartOnUpdate] = "true"
+ qSts.Spec.Template.Annotations = annotations
+
if qSts.Labels[bdv1.LabelInstanceGroupName] != instanceGroupName {
log.Debugf(ctx, "Skipping apply QuarksStatefulSet '%s/%s' for instance group '%s' because of mismatching '%s' label", bdpl.Namespace, qSts.Name, bdpl.Name, bdv1.LabelInstanceGroupName)
continue
