Skip to content

Old keys don't get removed from profiles. #68

Description

@marcusboden

Bug Description

When updating profile information, old keys to not get removed. I had a profile with

  resources:
    hard:
       limits.cpu: "128"
       limits.memory: "1.5Ti"
       limits.requests.storage: "1Ti"
       nvidia.com/gpu: "4"

This was synced as expected. Then I prepended limits. to the profile:

  resources:
    hard:
       limits.cpu: "128"
       limits.memory: "1.5Ti"
       limits.requests.storage: "1Ti"
       limits.nvidia.com/gpu: "4"

Now the profile has both keys and looks like this:

    resourceQuotaSpec:
      hard:
        limits.cpu: "128"
        limits.memory: 1.5Ti
        limits.nvidia.com/gpu: "4"
        limits.requests.storage: 1Ti
        nvidia.com/gpu: "4"

I believe the nvidia.com/gpu should be removed.

To Reproduce

  1. put the first profile from above into git and run sync
  2. verify kubectl get profiles -o yaml
  3. change the profile to the second one from above
  4. check kubectl get profiles -o yaml again

Environment

App Version Status Scale Charm Channel Rev Address Exposed Message
github-profiles-automator active 1 github-profiles-automator latest/edge 230 10.152.43.67 no

Relevant Log Output

.

Additional Context

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions