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

chart specific namespace_management applies to all namespaces #568

Closed
2 tasks done
lucasreed opened this issue Apr 12, 2022 · 1 comment · Fixed by #579
Closed
2 tasks done

chart specific namespace_management applies to all namespaces #568

lucasreed opened this issue Apr 12, 2022 · 1 comment · Fixed by #579
Assignees
Labels
bug Something isn't working

Comments

@lucasreed
Copy link
Contributor

What happened?

There is a top level namespace_managedment section plus a release level namespace_management section like so:

namespace_management:
  metadata:
    labels:
      goldilocks.fairwinds.com/enabled: "true"
  settings: {}

What did you expect to happen?

Only the release with the above section should have the label goldilocks.fairwinds.com/enabled: "true", but instead all of the namespaces installed via reckoner get that label.

How can we reproduce this?

A course file like so:

namespace: infra
repository: stable
context: kind-kind
repositories:
  bitnami:
    url: https://charts.bitnami.com/bitnami
  fairwinds-incubator:
    url: https://charts.fairwinds.com/incubator
  fairwinds-stable:
    url: https://charts.fairwinds.com/stable
namespace_management:
  default:
    metadata:
      annotations:
        ManagedBy: Reckoner
      labels:
        ManagedBy: Fairwinds
    settings:
      overwrite: true
charts:
  metrics-server:
    namespace: metrics-server
    chart: metrics-server
    version: 5.6.0
    repository: bitnami
    values:
      apiService:
        create: true
      extraArgs:
        kubelet-insecure-tls: true
        kubelet-preferred-address-types: InternalIP
  vpa:
    repository: fairwinds-stable
    namespace: vpa
    chart: vpa
  goldilocks:
    repository: fairwinds-stable
    namespace: goldilocks
    chart: goldilocks
    version: 6.1.0
  basic-demo:
    namespace: basic-demo
    repository: fairwinds-incubator
    chart: basic-demo
    namespace_management:
      metadata:
        labels:
          goldilocks.fairwinds.com/enabled: "true"

I get all these namespaces with the following labels:

basic-demo           Active   20m    ManagedBy=Fairwinds,goldilocks.fairwinds.com/enabled=true,kubernetes.io/metadata.name=basic-demo
goldilocks           Active   20m    ManagedBy=Fairwinds,goldilocks.fairwinds.com/enabled=true,kubernetes.io/metadata.name=goldilocks
metrics-server       Active   20m    ManagedBy=Fairwinds,goldilocks.fairwinds.com/enabled=true,kubernetes.io/metadata.name=metrics-server
vpa                  Active   32m    ManagedBy=Fairwinds,goldilocks.fairwinds.com/enabled=true,kubernetes.io/metadata.name=vpa

I expect only basic-demo namespace to get the goldilocks.fairwinds.com/enabled=true label.

Version

Version:6.0.0-rc.4 Commit:a163b28e538952188d12186b4f8a8562cc365708

Search

  • I did search for other open and closed issues before opening this.

Code of Conduct

  • I agree to follow this project's Code of Conduct

Additional context

No response

@lucasreed lucasreed added bug Something isn't working triage This bug needs triage labels Apr 12, 2022
@lucasreed lucasreed changed the title [go] chart specific namespace_management applies to all namespaces chart specific namespace_management applies to all namespaces Apr 13, 2022
@sudermanjr sudermanjr self-assigned this Apr 22, 2022
@sudermanjr sudermanjr removed the triage This bug needs triage label Apr 22, 2022
@sudermanjr
Copy link
Member

I verified this, and it happens in both v2 and v1 files. So it's not a conversion problem. I'll look into it

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.

2 participants