added command and args to status
Some checks failed
Build and Push Docker Image / Build image (push) Has been cancelled
Some checks failed
Build and Push Docker Image / Build image (push) Has been cancelled
This commit is contained in:
@@ -185,11 +185,27 @@ func (r *ServerManagerReconciler) Reconcile(ctx context.Context, req ctrl.Reques
|
||||
s.Status.Server.Running = true
|
||||
statusChanged = true
|
||||
}
|
||||
if s.Status.Server.Command == nil {
|
||||
s.Status.Server.Command = serverPod.Spec.Containers[0].Command
|
||||
statusChanged = true
|
||||
}
|
||||
if s.Status.Server.Args == nil {
|
||||
s.Status.Server.Args = serverPod.Spec.Containers[0].Args
|
||||
statusChanged = true
|
||||
}
|
||||
default:
|
||||
if s.Status.Server.Running {
|
||||
s.Status.Server.Running = false
|
||||
statusChanged = true
|
||||
}
|
||||
if len(s.Status.Server.Args) != 0 {
|
||||
s.Status.Server.Args = nil
|
||||
statusChanged = true
|
||||
}
|
||||
if len(s.Status.Server.Command) != 0 {
|
||||
s.Status.Server.Command = nil
|
||||
statusChanged = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -198,6 +214,14 @@ func (r *ServerManagerReconciler) Reconcile(ctx context.Context, req ctrl.Reques
|
||||
s.Status.Server.Running = false
|
||||
statusChanged = true
|
||||
}
|
||||
if len(s.Status.Server.Args) != 0 {
|
||||
s.Status.Server.Args = nil
|
||||
statusChanged = true
|
||||
}
|
||||
if len(s.Status.Server.Command) != 0 {
|
||||
s.Status.Server.Command = nil
|
||||
statusChanged = true
|
||||
}
|
||||
}
|
||||
|
||||
logging.Info("verified pod")
|
||||
|
Reference in New Issue
Block a user