Skip to content

[quotamanagement] Handle case where tree has duplicate node names #385

Open
@KPostOffice

Description

@KPostOffice

Currently when you have two nodes in a QuotaSubtree with the same name, such as:
tree.yaml

apiVersion: ibm.com/v1
kind: QuotaSubtree
metadata:
  name: context-root
  namespace: kube-system
  labels:
    tree: quota_context
spec:
  children:
    - name: context-root
      quotas:
        hardLimit: true
        requests:
          cpu: 2000
          memory: 8000Mi
---
apiVersion: ibm.com/v1
kind: QuotaSubtree
metadata:
  name: context-root-children
  namespace: kube-system
  labels:
    tree: quota_context
spec:
  parent: context-root
  children:
    - name: alpha
      quotas:
        hardLimit: true
        requests:
          cpu: 100
          memory: 4000Mi
    - name: beta
      quotas:
        hardLimit: true
        requests:
          cpu: 100
          memory: 4000Mi

node-dupes.yaml

apiVersion: ibm.com/v1
kind: QuotaSubtree
metadata:
  name: context-root-children-dupes
  namespace: kube-system
  labels:
    tree: quota_context
spec:
  parent: context-root
  children:
    - name: alpha
      quotas:
        hardLimit: true
        requests:
          cpu: 1000
          memory: 4000Mi
    - name: beta
      quotas:
        hardLimit: true
        requests:
          cpu: 1000
          memory: 4000Mi

they act as though both quotas are applied within an AppWrapper effectively making it the strictest subset of the two. This behavior should either be accepted and documented clearly , or the qst should be rejected and be given a clear condition as to why.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions