Skip to content

Field specific resource validation in admission webhook #91

@earaghbidikashani

Description

@earaghbidikashani

question: does it perform deep checks?

For example, say that we want to enforce deep-compliance check
[FAIL] case

  • pre-update resource: {cpu: 4, memory: 2Gi}
  • update resource request: {cpu: 5, memory: 2Gi}
  • template: {maxCpu: 4, maxMemory: 4Gi}

[PASS] case

  • pre-update resource: {cpu: 4, memory: 2Gi}
  • update resource request: {cpu: 5, memory: 2Gi}
  • template: {maxCpu: 5, maxMemory: 1Gi}

Rationale: the maxMemory bound is grandfathered.
We can discuss whether that's the behavior that we want. Whatever we decide, please add UTs to cover these cases.

Originally posted by @JGuinegagne in #86 (comment)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions