argoproj-labs / argo-rollouts-manager

Kubernetes Operator for Argo Rollouts controller.
https://argo-rollouts-manager.readthedocs.io/en/latest/
Apache License 2.0
84 stars 255 forks source link

Incorrect comparison in code in reconcileRolloutsDeployment function in deployments.go file #43

Closed Rizwana777 closed 3 months ago

Rizwana777 commented 4 months ago

The comparison !reflect.DeepEqual(actualPodSpec.Containers[0], desiredPodSpec.Containers) in the code snippet is incorrect. This is comparing actualPodSpec.Containers[0] (first index)and desiredPodSpec.Containers(slice) which is incorrect. As a result the comparison may not behave as expected and could lead to unintended consequences.