|
1 | 1 | # Kueue Addon for Open Cluster Management |
2 | 2 |
|
3 | | -This addon provides an integration between Kueue and Open Cluster Management (OCM) to simplify MultiKueue setup and enhance multicluster scheduling capabilities. |
| 3 | +This addon provides an integration between [Kueue](https://kueue.sigs.k8s.io/) and Open Cluster Management (OCM) to simplify MultiKueue setup and enhance multicluster scheduling capabilities. |
4 | 4 |
|
5 | 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 | | -The Kueue addon offers two primary benefits: |
| 7 | +The Kueue addon offers below benefits: |
8 | 8 |
|
9 | 9 | - **Simplified MultiKueue Setup** |
10 | 10 | - Automates the generation of MultiKueue specific Kubeconfig. |
11 | 11 | - Streamlines the configuration of MultiKueue resources. |
| 12 | + - Eliminates manual secret management. |
| 13 | + |
| 14 | +- **Centralizing Resource management** |
| 15 | + - Manage spoke resources (ResourceFlavor, ClusterQueue, LocalQueue) from a single hub. |
| 16 | + - Template-based deployment. |
12 | 17 |
|
13 | 18 | - **Enhanced Multicluster Scheduling** |
14 | 19 | - Integrates with OCM's placement with MultiKueue by implementing an admission check controller. |
15 | 20 | - Generate MultiKueueConfig & MultiKueueCluster dynamically based on OCM placement decision. |
| 21 | + - Supports advanced placement strategies. |
16 | 22 |
|
| 23 | +- **Flexible Installation Options** |
| 24 | + - Standard installation for existing Kueue setups. |
| 25 | + - Operator-based installation for OpenShift/OLM environments. |
| 26 | + - Cluster proxy support for enhanced connectivity. |
17 | 27 |
|
18 | 28 | ## Description |
19 | 29 |
|
@@ -109,45 +119,128 @@ This controller is running on the hub, contains a credential controller and an a |
109 | 119 | ### Addon chart |
110 | 120 | - **Addon deployment:** Deploy [Kueue addon controllers](#kueue-addon-controller) on the hub. |
111 | 121 | - **Addon Template:** To deploy `ResourceFlavor`, `ClusterQueue` and `LocalQueue` resources need by MultiKueue to spoke clusters. |
112 | | -- **Other addon files:** `ClusterManagementAddOn`, `ClusterRole`, `ClusterRoleBinding`, `ManagedClusterSetBinding`, `Placement` etc. |
| 122 | +- **Kueue Operator Template:** Optional operator-based Kueue installation on spoke clusters. |
| 123 | +- **Other addon files:** `ClusterManagementAddOn`, `ClusterRole`, `ClusterRoleBinding`, `ManagedClusterSetBinding`, `Placement` etc. |
113 | 124 |
|
114 | 125 | ## Prerequisites |
115 | 126 |
|
116 | 127 | - Open Cluster Management (OCM) installed with the following addons: |
117 | 128 | - [Cluster Permission Addon](https://github.com/open-cluster-management-io/cluster-permission) |
118 | 129 | - [Managed Service Account Addon](https://github.com/open-cluster-management-io/managed-serviceaccount) |
119 | | -- Kueue already installed on the hub and spoke cluster |
120 | | -- MultiKueue enabled on the hub |
| 130 | + - [Cluster Proxy Addon](https://github.com/open-cluster-management-io/cluster-proxy) (Optional) Enables hub-to-spoke connectivity for enhanced networking. |
| 131 | +- Kueue installed: |
| 132 | + - Hub Cluster with [Kueue](https://kueue.sigs.k8s.io/docs/installation/) installed and MultiKueue enabled. |
| 133 | + - Spoke Clusters with [Kueue](https://kueue.sigs.k8s.io/docs/installation/) pre-installed, or let this addon install Kueue via [operator](https://github.com/openshift/kueue-operator) (OpenShift/OLM environments). |
121 | 134 |
|
122 | 135 | ## Quick Start |
123 | 136 |
|
124 | | -**_Important_**: The addon requires you already installed OCM, Cluster Permission Addon, Managed Service Account Addon and Kueue. |
125 | | -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). |
126 | | - |
127 | | -## Installation |
128 | | - |
129 | | -On the hub cluster, deploy the addon. |
| 137 | +For a complete setup including all prerequisites on Kind: |
130 | 138 |
|
131 | 139 | ```bash |
132 | | -make deploy |
| 140 | +./build/setup-env.sh |
133 | 141 | ``` |
134 | 142 |
|
135 | | -You can install the addons via the helm charts. |
| 143 | +## Installation |
| 144 | + |
| 145 | +### Step 1: Add Helm Repository |
136 | 146 |
|
137 | 147 | ```bash |
138 | 148 | $ helm repo add ocm https://open-cluster-management.io/helm-charts/ |
139 | 149 | $ helm repo update |
140 | 150 | $ helm search repo ocm/kueue-addon |
141 | 151 | NAME CHART VERSION APP VERSION DESCRIPTION |
142 | 152 | ocm/kueue-addon <chart-version> <app-version> A Helm chart for Open Cluster Management Kueue ... |
| 153 | +``` |
| 154 | + |
| 155 | +### Step 2: Choose Your Installation Method |
| 156 | + |
| 157 | +#### Option A: Standard Installation (Kueue Pre-installed) |
| 158 | + |
| 159 | +For environments where Kueue is already installed: |
| 160 | + |
| 161 | +```bash |
143 | 162 | $ helm install \ |
144 | 163 | -n open-cluster-management-addon --create-namespace \ |
145 | 164 | kueue-addon ocm/kueue-addon |
146 | 165 | # Uncomment the following lines to customize your installation: |
147 | | - # --set skipClusterSetBinding=true \ |
148 | | - # --set image.tag=<chart-version> \ |
| 166 | + # --set skipClusterSetBinding=true |
| 167 | +``` |
| 168 | + |
| 169 | +#### Option B: Operator-based Installation (OpenShift/OLM) |
| 170 | + |
| 171 | +In operator-based environments (for example, OpenShift with OLM), the addon can install the [Kueue operator](https://github.com/openshift/kueue-operator) for you. |
| 172 | + |
| 173 | +Prepare a values.operator.yaml with below content: |
| 174 | + |
| 175 | +```yaml |
| 176 | +kueue: |
| 177 | + namespace: "openshift-kueue-operator" |
| 178 | + |
| 179 | +# Install Kueue via Operator |
| 180 | +installKueueViaOperator: true |
| 181 | + |
| 182 | +# Operator Lifecycle Manager RBAC configuration |
| 183 | +operatorLifecycleManager: |
| 184 | + clusterRoleBindingName: kueue-operator-lifecycle-manager-rolebinding |
| 185 | + clusterRoleName: system:controller:operator-lifecycle-manager |
| 186 | + |
| 187 | +# Kueue Operator configuration |
| 188 | +kueueOperator: |
| 189 | + name: kueue-operator |
| 190 | + namespace: openshift-kueue-operator |
| 191 | + operatorGroupName: openshift-kueue-operator |
| 192 | + channel: stable-v1.0 |
| 193 | + source: redhat-operators |
| 194 | + sourceNamespace: openshift-marketplace |
| 195 | + startingCSV: kueue-operator.v1.0.1 |
| 196 | + |
| 197 | +# Cert Manager Operator configuration |
| 198 | +certManagerOperator: |
| 199 | + name: openshift-cert-manager-operator |
| 200 | + namespace: cert-manager-operator |
| 201 | + operatorGroupName: cert-manager-operator |
| 202 | + channel: stable-v1 |
| 203 | + source: redhat-operators |
| 204 | + sourceNamespace: openshift-marketplace |
| 205 | + startingCSV: cert-manager-operator.v1.17.0 |
| 206 | + |
| 207 | +# Cluster proxy configuration |
| 208 | +clusterProxy: |
| 209 | + url: "https://<cluster-proxy-url>" |
| 210 | + |
| 211 | +networkPolicy: |
| 212 | + name: kueue-allow-egress-cluster-proxy-dns |
| 213 | + namespace: "openshift-kueue-operator" |
| 214 | + spec: |
| 215 | + podSelector: |
| 216 | + matchLabels: |
| 217 | + app.openshift.io/name: kueue |
| 218 | + policyTypes: |
| 219 | + - Egress |
| 220 | + egress: |
| 221 | + - ports: |
| 222 | + - port: 80 |
| 223 | + protocol: TCP |
| 224 | + - ports: |
| 225 | + - port: 443 |
| 226 | + protocol: TCP |
| 227 | + - to: |
| 228 | + - namespaceSelector: |
| 229 | + matchLabels: |
| 230 | + kubernetes.io/metadata.name: <cluster-proxy-namespace> |
| 231 | +``` |
| 232 | +
|
| 233 | +```bash |
| 234 | +$ helm install \ |
| 235 | + -n open-cluster-management-addon --create-namespace \ |
| 236 | + kueue-addon ocm/kueue-addon \ |
| 237 | + -f values.operator.yaml |
| 238 | + # Uncomment the following lines to customize your installation: |
| 239 | + # --set skipClusterSetBinding=true |
149 | 240 | ``` |
150 | 241 |
|
| 242 | +## Verification |
| 243 | + |
151 | 244 | To confirm the installation from hub: |
152 | 245 |
|
153 | 246 | ```bash |
@@ -182,7 +275,7 @@ default-flavor 4h28m |
182 | 275 |
|
183 | 276 | ## Usage |
184 | 277 |
|
185 | | -The usage please refer to this [Kueue Integration Solution](https://github.com/open-cluster-management-io/ocm/blob/main/solutions/kueue-admission-check). |
| 278 | +For detailed usage examples and advanced scenarios, refer to the [Kueue Integration Solution](https://github.com/open-cluster-management-io/ocm/blob/main/solutions/kueue-admission-check). |
186 | 279 |
|
187 | 280 | ## Design Details and Workflow |
188 | 281 |
|
@@ -293,4 +386,3 @@ This automation greatly reduces manual effort and ensures that MultiKueue enviro |
293 | 386 | - The admission check controller watches for `AdmissionCheck` resources referencing OCM `Placement`. |
294 | 387 | - The admission check controller watches the `PlacementDecision`, creates or updates `MultiKueueCluster` resources with the kubeconfig details for each cluster, and also update these clusters in the `MultiKueueConfig` resource. |
295 | 388 | - Finally, admission check controller updates the `AdmissionCheck` condition to true, indicating successful generation of the `MultiKueueConfig` and `MultiKueueCluster`, readying the [MultiKueue](https://kueue.sigs.k8s.io/docs/concepts/multikueue/) environment for job scheduling. |
296 | | - |
|
0 commit comments