volcano.sh/volcano@v1.9.0/docs/design/plugin-conf.md (about)

     1  # Dynamic Plugins Configuration
     2  
     3  ## Table of Contents
     4  
     5     * [Dynamic Plugins Configuration](#dynamic-plugins-configuration)
     6        * [Table of Contents](#table-of-contents)
     7        * [Motivation](#motivation)
     8        * [Function Detail](#function-detail)
     9        * [Feature Interaction](#feature-interaction)
    10           * [ConfigMap](#configmap)
    11        * [Reference](#reference)
    12  
    13  Created by [gh-md-toc](https://github.com/ekalinin/github-markdown-toc)
    14  
    15  ## Motivation
    16  
    17  There are several plugins and actions in `kube-batch` right now; the users may want to only enable part of plugins and actions. This document is going to introduce dynamic plugins configuration, so the users can configure `kube-batch` according to their
    18  scenario on the fly.
    19  
    20  ## Function Detail
    21  
    22  The following YAML format will be introduced for dynamic plugin configuration:
    23  
    24  ```yaml
    25  actions: "list_of_action_in_order"
    26  tiers:
    27  - plugins:
    28    - name: "plugin_1"
    29      disableJobOrder: true
    30    - name: "plugin_2"
    31  - plugins:
    32    - name: "plugin_3"
    33      disableJobOrder: true
    34  ```
    35  
    36  The `actions` is a list of actions that will be executed by `kube-batch` in order, separated
    37  by commas. Refer to the [tutorial](https://github.com/kubernetes-sigs/kube-batch/issues/434) for
    38  the list of supported actions in `kube-batch`. Those actions will be executed in order, although
    39  the "order" maybe incorrect; the `kube-batch` does not enforce that.
    40  
    41  The `tiers` is a list of plugins that will be used by related actions, e.g. `allocate`. It includes
    42  several tiers of plugin list by `plugins`; if it fits plugins in high priority tier, the action will not
    43  go through the plugins in lower priority tiers. In each tier, it's considered passed if all the plugins are
    44  fitted in `plugins.names`.
    45  
    46  The `options` defines the detail behaviour of each plugins, e.g. whether preemption is enabled. If not
    47  specific, `true` is default value. For now, `preemptable`, `jobOrder`, `taskOrder` are supported.
    48  
    49  Takes following example as demonstration:
    50  
    51  1. The actions `"reclaim, allocate, backfill, preempt"` will be executed in order by `kube-batch`
    52  1. `"priority"` has higher priority than `"gang, drf, predicates, proportion"`; a job with higher priority
    53  will preempt other jobs, although it's already allocated "enough" resource according to `"drf"`
    54  1. `"tiers.plugins.drf.disableTaskOrder"` is `true`, so `drf` will not impact task order phase/action
    55  
    56  ```yaml
    57  actions: "reclaim, allocate, backfill, preempt"
    58  tiers:
    59  - plugins:
    60    - name: "priority"
    61    - name: "gang"
    62  - plugins:
    63    - name: "drf"
    64      disableTaskOrder: true
    65    - name: "predicates"
    66    - name: "proportion"
    67  ```
    68  
    69  ## Feature Interaction
    70  
    71  ### ConfigMap
    72  
    73  `kube-batch` will read the plugin configuration from command line argument `--scheduler-conf`; user can
    74  use `ConfigMap` to acesss the volume of `kube-batch` pod during deployment.
    75  
    76  ## Reference
    77  
    78  * [Add preemption by Job priority](https://github.com/kubernetes-sigs/kube-batch/issues/261)
    79  * [Support multiple tiers for Plugins](https://github.com/kubernetes-sigs/kube-batch/issues/484)