Skip to content

Conversation

@dibaro
Copy link
Contributor

@dibaro dibaro commented Sep 22, 2025

Description

This PR adds support for using existing PriorityClass resources in the cluster when level=0 and a name is provided. Previously, users could only create new PriorityClass resources or not use any priority at all.

Changes

  • Modified imgproxy.resources.priorityClassName helper to return the name when level=0 and a name is provided
  • Updated imgproxy.resources.explicitPriorityClassName helper to only create PriorityClass resources when level > 0
  • Enhanced documentation in values.yaml to clearly explain the three usage scenarios

Usage Scenarios

  1. level > 0: Creates a new PriorityClass with the specified name and assigns it to pods
  2. level = 0 + name provided: Uses an existing PriorityClass with the specified name (no new PriorityClass created)
  3. level = 0 + no name: No PriorityClass is used

Example

resources:
  deployment:
    priority:
      name: "my-existing-priority-class"
      level: 0

Testing

  • Verified that existing PriorityClass is used when level=0 and name is provided
  • Confirmed that new PriorityClass is still created when level > 0
  • Ensured no PriorityClass is used when both level=0 and no name is provided
  • All existing functionality remains backward compatible

Backward Compatibility

This change is fully backward compatible. All existing configurations will continue to work as before.

@gzigzigzeo
Copy link
Collaborator

Thank you. LGTM, will merge shortly.

@gzigzigzeo gzigzigzeo merged commit 798754e into imgproxy:master Sep 25, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants