Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pre-existing resources should be upgraded to SSA #120

Closed
erikgb opened this issue Feb 23, 2024 · 0 comments · Fixed by #121
Closed

Pre-existing resources should be upgraded to SSA #120

erikgb opened this issue Feb 23, 2024 · 0 comments · Fixed by #121
Labels
bug Something isn't working

Comments

@erikgb
Copy link
Contributor

erikgb commented Feb 23, 2024

Describe the bug

We have installed the latest version of Accurate (1.3.0), which includes migration to SSA (#112). While everything seems to work well, we have noticed that pre-existing resources (from before we installed the release with migration to SSA) have some suspicious managedFields. Example for a namespace controlled by a sub-namespace:

managedFields:
  - manager: accurate-controller
    operation: Apply
    apiVersion: v1
    fieldsType: FieldsV1
    fieldsV1:
      'f:metadata':
        'f:annotations':
          'f:collectord.io/index': {}
        'f:labels':
          'f:trust.statnett.no/inject-statnett-bundle': {}
  - manager: accurate-controller
    operation: Update
    apiVersion: v1
    time: '2023-11-08T15:01:07Z'
    fieldsType: FieldsV1
    fieldsV1:
      'f:metadata':
        'f:annotations':
          .: {}
          'f:collectord.io/index': {}
        'f:labels':
          .: {}
          'f:accurate.cybozu.com/parent': {}
          'f:app.kubernetes.io/created-by': {}
          'f:kubernetes.io/metadata.name': {}
          'f:trust.statnett.no/inject-statnett-bundle': {}

This results in unset fields in the SSA patch to retain in the owned resource, which is the issue the migration to SSA PR was supposed to solve (#98).

Environments

N/A

To Reproduce

Steps to reproduce the behavior:

  1. Install one of the previous versions of Accurate before we migrated to SSA.
  2. Create a SubNamespace adding a label/annotation to the sub-namespace.
  3. Upgrade Accurate to the latest version including migration to SSA
  4. Remove sub-namespace a label/annotation from SubNamespace created in 2.
  5. Observe the label/annotation is still present on sub-namespace.

Expected behavior

The label/annotation removed from SubNamespace spec should be removed from sub-namespace.

Additional context

I know how to fix this and will prepare a PR. 🤠

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant