Skip to content

Populated 'unexpected' resources while comparing target and live states#137

Merged
alexmt merged 3 commits intoargoproj:masterfrom
alexmt:104-unexpected-resources
Apr 27, 2018
Merged

Populated 'unexpected' resources while comparing target and live states#137
alexmt merged 3 commits intoargoproj:masterfrom
alexmt:104-unexpected-resources

Conversation

@alexmt
Copy link
Collaborator

@alexmt alexmt commented Apr 27, 2018

Closes #104

@alexmt alexmt requested review from jessesuen and merenbach April 27, 2018 20:11
Copy link
Member

@jessesuen jessesuen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just add some comments for each scenario why we decide something is OutOfSync.

func isControlledBy(obj *unstructured.Unstructured, parent *unstructured.Unstructured) bool {
// TODO: remove special case after Service and Endpoint get explicit relationship ( https://github.com/kubernetes/kubernetes/issues/28483 )
if obj.GetKind() == kubeutil.EndpointsKind && parent.GetKind() == kubeutil.ServiceKind {
return obj.GetName() == parent.GetName()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!


if targetObjs[i] == nil {
resState.TargetState = "null"
resState.Status = v1alpha1.ComparisonStatusOutOfSync
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have no problems with the logic, but it takes some time to understand it. Can we add comments about each scenario and why we are considering it out of sync? For example:

  1. object is in target, but does not exist in live
  2. object is in target and live, but differ
  3. object is not defined in target, but exists in the live state

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@alexmt alexmt merged commit 917f1df into argoproj:master Apr 27, 2018
leoluz pushed a commit to leoluz/argo-cd that referenced this pull request Sep 29, 2023
…oj#137)

* fix: health status is set to healthy for statefulset with updateStrategy: OnDelete

* fix: updated message

* fix: added test

* fix: health status for daemon set with Ondelete updateStrategy
sujeilyfonseca pushed a commit to sujeilyfonseca/argo-cd that referenced this pull request Jun 7, 2024
sujeilyfonseca pushed a commit to sujeilyfonseca/argo-cd that referenced this pull request Jun 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants