open-cluster-management-io / addon-framework

addon apis
Apache License 2.0
23 stars 40 forks source link

helm addon: GetSpecHash unable to handle ConfigMap and Secret resources #237

Closed JoaoBraveCoding closed 6 months ago

JoaoBraveCoding commented 7 months ago

Describe the bug

As far as I understand the function GetSpecHash is used to generate a hash with the Spec content of a k8s resource. This hash is stored in the status of ManagedClusterAddOn and used by the framework to know if the current state of ManifestWorks is up to date. The problem is that when we use as config resources k8s resources that don't have a Spec field such as ConfigMaps or Secrets.

To Reproduce

Deploy a ManagedClusterAddOn that has in its config a ConfigMap or Secret

Expected behavior

The framework should not discriminate these two resources and it should handle them properly

Additional context

Problem is with https://github.com/open-cluster-management-io/addon-framework/blob/71f1b13cbb6356279d5ae49667324ef5f9b7c3e0/pkg/utils/helpers.go#L354-L371

qiujian16 commented 6 months ago

/assign @haoqing0110

haoqing0110 commented 6 months ago

Similar as https://github.com/open-cluster-management-io/ocm/issues/364, will fix it.

qiujian16 commented 6 months ago

/close

this has been fixed

openshift-ci[bot] commented 6 months ago

@qiujian16: Closing this issue.

In response to [this](https://github.com/open-cluster-management-io/addon-framework/issues/237#issuecomment-2003844016): >/close > >this has been fixed Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.