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

Turn StrategyParameters.NodeResourceUtilizationThresholds field into a pointer #240

Commits on Apr 28, 2020

  1. Turn StrategyParameters.NodeResourceUtilizationThresholds field into …

    …a pointer
    
    The field is intended to be omitempty when not set. Without a pointer the strategy
    serialized into json string looks like:
    
    ```json
    strategies:
      LowNodeUtilization:
        enabled: true
        params:
          nodeResourceUtilizationThresholds:
            numberOfNodes: 1
            targetThresholds:
              cpu: 50
              memory: 50
              pods: 20
            thresholds:
              cpu: 50
              memory: 50
              pods: 20
      RemoveDuplicates:
        enabled: true
        params:
          nodeResourceUtilizationThresholds: {}
      RemovePodsViolatingInterPodAntiAffinity:
        enabled: true
        params:
          nodeResourceUtilizationThresholds: {}
      RemovePodsViolatingNodeAffinity:
        enabled: true
        params:
          nodeAffinityType:
          - requiredDuringSchedulingIgnoredDuringExecution
          nodeResourceUtilizationThresholds: {}
      RemovePodsViolatingNodeTaints:
        enabled: true
        params:
          nodeResourceUtilizationThresholds: {}
    ```
    
    It's preferred to have the following json string instead:
    ```
    strategies:
      LowNodeUtilization:
        enabled: true
        params:
          nodeResourceUtilizationThresholds:
            numberOfNodes: 1
            targetThresholds:
              cpu: 50
              memory: 50
              pods: 20
            thresholds:
              cpu: 50
              memory: 50
              pods: 20
      RemoveDuplicates:
        enabled: true
      RemovePodsViolatingInterPodAntiAffinity:
        enabled: true
      RemovePodsViolatingNodeAffinity:
        enabled: true
        params:
          nodeAffinityType:
          - requiredDuringSchedulingIgnoredDuringExecution
      RemovePodsViolatingNodeTaints:
        enabled: true
    ```
    ingvagabund committed Apr 28, 2020
    Configuration menu
    Copy the full SHA
    991eddb View commit details
    Browse the repository at this point in the history