|
1 | | -# kueue-addon |
| 1 | +# Kueue Addon for Open Cluster Management |
2 | 2 |
|
3 | | -TBD |
| 3 | +This addon provides an integration between Kueue and Open Cluster Management (OCM) to simplify MultiKueue setup and enhance multicluster scheduling capabilities. |
4 | 4 |
|
5 | | -This addon is for solution https://github.com/open-cluster-management-io/ocm/blob/main/solutions/kueue-admission-check |
| 5 | +This integration is designed for Kueue users who want to leverage OCM's capabilities to improve their multicluster workload scheduling experience. |
6 | 6 |
|
7 | | -Tasks refer to https://github.com/open-cluster-management-io/ocm/issues/902. |
| 7 | +The Kueue addon offers two primary benefits: |
| 8 | + |
| 9 | +- **Simplified MultiKueue Setup** |
| 10 | + - Automates the generation of MultiKueue specific Kubeconfig. |
| 11 | + - Streamlines the configuration of MultiKueue resources. |
| 12 | + |
| 13 | +- **Enhanced Multicluster Scheduling** |
| 14 | + - Integrates with OCM's placement with MultiKueue by implementing an admission check controller. |
| 15 | + - Generate MultiKueueConfig & MultiKueueCluster dynamically based on OCM placement decision. |
| 16 | + |
| 17 | + |
| 18 | +## Description |
| 19 | + |
| 20 | +This repository contains the kueue addon controller and addon chart to deploy resources to hub and spoke clusters. |
| 21 | + |
| 22 | +### Architecture Overview |
| 23 | + |
| 24 | + |
| 25 | + |
| 26 | +### Kueue addon controller |
| 27 | +This controller is running on the hub, contains a credential controller and an admission check controller. |
| 28 | +- **Credential Controller** |
| 29 | + - Create `ClusterPermission` and `ManagedServiceAccount` for each spoke to get credential. |
| 30 | + - Generates kubeconfig secrets for MultiKueue under `kueue-system` namespace. |
| 31 | +- **Admission Check Controller** |
| 32 | + - Watches the `Placement` and `PlacementDecision` to generates `MultiKueueConfig` and `MultiKueueCluster` resources dynamically. |
| 33 | + - Set the `AdmissionCheck` condition `Active` to true when success. |
| 34 | + |
| 35 | +### Addon chart |
| 36 | +- **Addon deployment:** Deploy [Kueue addon controllers](#kueue-addon-controller) on the hub. |
| 37 | +- **Addon Template:** To deploy `ResourceFlavor`, `ClusterQueue` and `LocalQueue` resources need by MultiKueue to spoke clusters. |
| 38 | +- **Other addon files:** `ClusterManagementAddOn`, `ClusterRole`, `ClusterRoleBinding`, `ManagedClusterSetBinding`, `Placement` etc. |
| 39 | + |
| 40 | +## Prerequisites |
| 41 | + |
| 42 | +- Open Cluster Management (OCM) installed with the following addons: |
| 43 | + - [Cluster Permission Addon](https://github.com/open-cluster-management-io/cluster-permission) |
| 44 | + - [Managed Service Account Addon](https://github.com/open-cluster-management-io/managed-serviceaccount) |
| 45 | +- Kueue already installed on the hub and spoke cluster |
| 46 | +- MultiKueue enabled on the hub |
| 47 | + |
| 48 | +## Quick Start |
| 49 | + |
| 50 | +**_Important_**: The addon requires you already installed OCM, Cluster Permission Addon, Managed Service Account Addon and Kueue. |
| 51 | +The whole setup steps about this solution, please refer to this [Kueue Integration Solution](https://github.com/open-cluster-management-io/ocm/blob/main/solutions/kueue-admission-check). |
| 52 | + |
| 53 | +## Installation |
| 54 | + |
| 55 | + |
| 56 | +On the hub cluster, deploy the addon. |
| 57 | + |
| 58 | +```bash |
| 59 | +make deploy |
| 60 | +``` |
| 61 | + |
| 62 | +You can install the addons via the helm charts. |
| 63 | + |
| 64 | +```bash |
| 65 | +helm install kueue-addon charts/kueue-addon/ \ |
| 66 | + -n open-cluster-management-addon --create-namespace |
| 67 | +``` |
| 68 | + |
| 69 | +To confirm the installation from hub: |
| 70 | + |
| 71 | +```bash |
| 72 | +$ kubectl get cma kueue-addon |
| 73 | +NAME DISPLAY NAME CRD NAME |
| 74 | +kueue-addon kueue-addon |
| 75 | + |
| 76 | +$ kubectl get mca -A | grep kueue-addon |
| 77 | +NAMESPACE NAME AVAILABLE DEGRADED PROGRESSING |
| 78 | +<your cluster> kueue-addon True False |
| 79 | + |
| 80 | +$ kubectl get deploy -n open-cluster-management kueue-addon-controller |
| 81 | +NAME READY UP-TO-DATE AVAILABLE AGE |
| 82 | +kueue-addon-controller 1/1 1 1 4h27m |
| 83 | +``` |
| 84 | + |
| 85 | +To confirm the installation from spoke: |
| 86 | + |
| 87 | +```bash |
| 88 | +$ kubectl get clusterqueue |
| 89 | +NAME COHORT PENDING WORKLOADS |
| 90 | +cluster-queue 0 |
| 91 | + |
| 92 | +$ kubectl get localqueue |
| 93 | +NAME CLUSTERQUEUE PENDING WORKLOADS ADMITTED WORKLOADS |
| 94 | +user-queue cluster-queue 0 0 |
| 95 | + |
| 96 | +$ kubectl get resourceflavor |
| 97 | +NAME AGE |
| 98 | +default-flavor 4h28m |
| 99 | +``` |
| 100 | + |
| 101 | +## Usage |
| 102 | + |
| 103 | +The usage please refer to this [Kueue Integration Solution](https://github.com/open-cluster-management-io/ocm/blob/main/solutions/kueue-admission-check). |
0 commit comments