Skip to content

Operator indefinitely reconciling CR with Deployed Helm Release due to Basic String Comparison #1531

Closed
@muralov

Description

@muralov

Bug Report

What did you do?
We have a chart which is dependent on other 4 helm charts. We have deployed all the charts with helm operator.

What did you expect to see?
The operator deployed our application well and it is working well. Also, reconciling is working well.

What did you see instead? Under which circumstances?
However, we have noticed that the operator is constantly updating our CR and some resources (.e.g secrets, network policies). We had huge secrets with our helm charts which lead to huge CR (1mb). Indefinite update of the CR brought our ETCD down, where ETCD duplicates resources if a new version of a resource comes.

Are you writing your operator in ansible, helm, or go?
helm

Possible Solution
It can be solved by implementiong deep equal for the line https://github.com/operator-framework/operator-sdk/blob/master/pkg/helm/release/manager.go#L139

Additional context
I have seen in the source code that basic string comparison is done between candidate and deployed release manifests strings. However, 'helm install --dry-run' is generating different texts where content is the same, but the order of some resources are changed. Here is comparison line https://github.com/operator-framework/operator-sdk/blob/master/pkg/helm/release/manager.go#L139

Metadata

Metadata

Assignees

Labels

kind/bugCategorizes issue or PR as related to a bug.language/helmIssue is related to a Helm operator project

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions