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

Fix README formatting #1927

Merged
merged 1 commit into from Mar 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 10 additions & 4 deletions cmd/importer/README.md
Expand Up @@ -2,7 +2,7 @@

A tool able to import existing pods into kueue.

## Cluster setup.
## Cluster setup

The importer should run in a cluster having the Kueue CRDs defined and in which the `kueue-controller-manager` is not running or has the `pod` integration framework disabled. Check Kueue's [installation guide](https://kueue.sigs.k8s.io/docs/installation/) and [Run Plain Pods](https://kueue.sigs.k8s.io/docs/tasks/run_plain_pods/#before-you-begin) for details.

Expand All @@ -11,6 +11,7 @@ For an import to succeed, all the involved Kueue objects (LocalQueues, ClusterQu
## Build

From kueue source root run:

```bash
make importer-build

Expand All @@ -21,6 +22,7 @@ make importer-build
The command runs against the systems default kubectl configuration. Check the [kubectl documentation](https://kubernetes.io/docs/tasks/access-application-cluster/configure-access-multiple-clusters/) to learn more about how to Configure Access to Multiple Clusters.

### Check

The importer will perform following checks:

- At least one `namespace` is provided.
Expand Down Expand Up @@ -61,6 +63,7 @@ It's done providing an yaml mapping file name as `--queuemapping-file` argument,
- `skip: true` can be used to ignore the pods matching a rule.

### Import

After which, if `--dry-run=false` was specified, for each selected Pod the importer will:

- Update the Pod's Kueue related labels.
Expand All @@ -74,10 +77,13 @@ After which, if `--dry-run=false` was specified, for each selected Pod the impor
```bash
./bin/importer import -n ns1,ns2 --queuelabel=src.lbl --queuemapping=src-val=user-queue,src-val2=user-queue2 --dry-run=false
```

Will import all the pods in namespace `ns1` or `ns2` having the label `src.lbl` set in LocalQueues `user-queue` or `user-queue2` depending on `src.lbl` value.

#### Advanced mapping
#### Advanced mapping

With mapping file:

```yaml
- match:
labels:
Expand All @@ -97,8 +103,7 @@ After which, if `--dry-run=false` was specified, for each selected Pod the impor

Will import all the pods in namespace `ns1` or `ns2` having the label `src.lbl` set to `src-val` in LocalQueue `user-queue` regardless of their priorityClassName and those with `src.lbl==src-val2` ,`src2.lbl==src2-val` and `priorityClassName==p-class`in `user-queue2`.


#### Run in cluster
### Run in cluster

`cmd/importer/run-in-cluster` provides the necessary kustomize manifests needed to run the importer from within the cluster.

Expand All @@ -117,6 +122,7 @@ Make the created image accessible by your cluster.
Note: Importer images will be available in `gcr.io/k8s-staging-kueue/importer` soon.

And run

```bash
(cd cmd/importer/run-in-cluster && kustomize edit set image importer=<image:tag>)
```
Expand Down