fix: Cluster operator degraded#995
Conversation
|
Skipping CI for Draft Pull Request. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
b3b5e0a to
0f877c6
Compare
8d19285 to
3ee2b0d
Compare
controllers/consoleplugin.go
Outdated
| TerminationMessagePath: corev1.TerminationMessagePathDefault, | ||
| TerminationMessagePolicy: corev1.TerminationMessageReadFile, |
There was a problem hiding this comment.
Why are these required? some new required container params?
| err = retry.RetryOnConflict(retry.DefaultRetry, func() error { | ||
| if err := r.Client.Get(context.TODO(), types.NamespacedName{Name: existingArgoCD.Name, Namespace: existingArgoCD.Namespace}, existingArgoCD); err != nil { | ||
| return err | ||
| } | ||
| changed := false | ||
| if existingArgoCD.Spec.ApplicationSet != nil { | ||
| if existingArgoCD.Spec.ApplicationSet.Resources == nil { | ||
| existingArgoCD.Spec.ApplicationSet.Resources = defaultArgoCDInstance.Spec.ApplicationSet.Resources | ||
| changed = true | ||
| } | ||
| } | ||
| if existingArgoCD.Spec.Controller.Resources == nil { | ||
| existingArgoCD.Spec.Controller.Resources = defaultArgoCDInstance.Spec.Controller.Resources | ||
| changed = true | ||
| } | ||
| if argocdcontroller.UseDex(existingArgoCD) { | ||
| if existingArgoCD.Spec.SSO != nil && existingArgoCD.Spec.SSO.Provider == argoapp.SSOProviderTypeDex { | ||
| if existingArgoCD.Spec.SSO.Dex != nil { | ||
| if existingArgoCD.Spec.SSO.Dex.Resources == nil { | ||
| existingArgoCD.Spec.SSO.Dex.Resources = defaultArgoCDInstance.Spec.SSO.Dex.Resources | ||
| changed = true | ||
| } | ||
| } | ||
| } | ||
| } | ||
| //lint:ignore SA1019 known to be deprecated | ||
| if existingArgoCD.Spec.Grafana.Resources == nil { //nolint:staticcheck // SA1019: We must test deprecated fields. | ||
| //lint:ignore SA1019 known to be deprecated | ||
| existingArgoCD.Spec.Grafana.Resources = defaultArgoCDInstance.Spec.Grafana.Resources //nolint:staticcheck // SA1019: We must test deprecated fields. | ||
| changed = true | ||
| } | ||
| if existingArgoCD.Spec.HA.Resources == nil { | ||
| existingArgoCD.Spec.HA.Resources = defaultArgoCDInstance.Spec.HA.Resources | ||
| changed = true | ||
| } | ||
| if existingArgoCD.Spec.Redis.Resources == nil { | ||
| existingArgoCD.Spec.Redis.Resources = defaultArgoCDInstance.Spec.Redis.Resources | ||
| changed = true | ||
| } | ||
| if existingArgoCD.Spec.Repo.Resources == nil { | ||
| existingArgoCD.Spec.Repo.Resources = defaultArgoCDInstance.Spec.Repo.Resources | ||
| changed = true | ||
| } | ||
| if existingArgoCD.Spec.Server.Resources == nil { | ||
| existingArgoCD.Spec.Server.Resources = defaultArgoCDInstance.Spec.Server.Resources | ||
| changed = true | ||
| } | ||
| if defaultArgoCDInstance.Spec.NodePlacement != nil { | ||
| if !equality.Semantic.DeepEqual(existingArgoCD.Spec.NodePlacement, defaultArgoCDInstance.Spec.NodePlacement) { | ||
| existingArgoCD.Spec.NodePlacement = defaultArgoCDInstance.Spec.NodePlacement | ||
| changed = true | ||
| } | ||
| } else if existingArgoCD.Spec.NodePlacement != nil { | ||
| existingArgoCD.Spec.NodePlacement = defaultArgoCDInstance.Spec.NodePlacement | ||
| changed = true | ||
| } | ||
| if !changed { | ||
| return nil | ||
| } | ||
| return r.Client.Update(context.TODO(), existingArgoCD) | ||
| }) |
There was a problem hiding this comment.
Can you recheck this logic? Seems like similar checks exists here:
gitops-operator/controllers/gitopsservice_controller.go
Lines 470 to 530 in 9be8c92
Signed-off-by: Atif Ali <[email protected]>
Signed-off-by: Atif Ali <[email protected]>
Signed-off-by: Atif Ali <[email protected]>
Signed-off-by: Atif Ali <[email protected]>
9be8c92 to
134a3b5
Compare
Signed-off-by: Atif Ali <[email protected]>
|
Replaced by: #1060 |
Fixes: GITOPS-8042