Skip to content
Merged
Show file tree
Hide file tree
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
3 changes: 3 additions & 0 deletions internal/etos/api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,9 @@ func (r *ETOSApiDeployment) reconcileDeployment(ctx context.Context, logger logr
return target, nil
} else if r.restartRequired {
logger.Info("Configuration(s) have changed, restarting deployment")
if deployment.Spec.Template.Annotations == nil {
deployment.Spec.Template.Annotations = make(map[string]string)
}
deployment.Spec.Template.Annotations["etos.eiffel-community.github.io/restartedAt"] = time.Now().Format(time.RFC3339)
}
if !r.restartRequired && equality.Semantic.DeepDerivative(target.Spec, deployment.Spec) {
Expand Down
3 changes: 3 additions & 0 deletions internal/etos/suitestarter/suitestarter.go
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,9 @@ func (r *ETOSSuiteStarterDeployment) reconcileDeployment(ctx context.Context, lo
return target, nil
} else if r.restartRequired {
logger.Info("Configuration(s) have changed, restarting deployment")
if deployment.Spec.Template.Annotations == nil {
deployment.Spec.Template.Annotations = make(map[string]string)
}
deployment.Spec.Template.Annotations["etos.eiffel-community.github.io/restartedAt"] = time.Now().Format(time.RFC3339)
}
if !r.restartRequired && equality.Semantic.DeepDerivative(target.Spec, deployment.Spec) {
Expand Down
3 changes: 3 additions & 0 deletions internal/extras/eventrepository.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,9 @@ func (r *EventRepositoryDeployment) reconcileDeployment(ctx context.Context, log
return nil, r.Delete(ctx, deployment)
} else if r.restartRequired {
logger.Info("Configuration(s) have changed, restarting deployment")
if deployment.Spec.Template.Annotations == nil {
deployment.Spec.Template.Annotations = make(map[string]string)
}
deployment.Spec.Template.Annotations["etos.eiffel-community.github.io/restartedAt"] = time.Now().Format(time.RFC3339)
}
if !r.restartRequired && equality.Semantic.DeepDerivative(target.Spec, deployment.Spec) {
Expand Down
3 changes: 3 additions & 0 deletions internal/extras/mongodb.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,9 @@ func (r *MongoDBDeployment) reconcileStatefulset(ctx context.Context, logger log
return nil, r.Delete(ctx, mongodb)
} else if r.restartRequired {
logger.Info("Configuration(s) have changed, restarting statefulset")
if mongodb.Spec.Template.Annotations == nil {
mongodb.Spec.Template.Annotations = make(map[string]string)
}
mongodb.Spec.Template.Annotations["etos.eiffel-community.github.io/restartedAt"] = time.Now().Format(time.RFC3339)
}
return target, r.Patch(ctx, target, client.StrategicMergeFrom(mongodb))
Expand Down
3 changes: 3 additions & 0 deletions internal/extras/rabbitmq.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,9 @@ func (r *RabbitMQDeployment) reconcileStatefulset(ctx context.Context, logger lo
return nil, r.Delete(ctx, rabbitmq)
} else if r.restartRequired {
logger.Info("Configuration(s) have changed, restarting statefulset")
if rabbitmq.Spec.Template.Annotations == nil {
rabbitmq.Spec.Template.Annotations = make(map[string]string)
}
rabbitmq.Spec.Template.Annotations["etos.eiffel-community.github.io/restartedAt"] = time.Now().Format(time.RFC3339)
}
return target, r.Patch(ctx, target, client.StrategicMergeFrom(rabbitmq))
Expand Down