Skip to content

Commit

Permalink
Fix README formatting (kubernetes-sigs#1927)
Browse files Browse the repository at this point in the history
  • Loading branch information
yaroslava-serdiuk authored and vsoch committed Apr 18, 2024
1 parent a260b62 commit 54c9efc
Showing 1 changed file with 10 additions and 4 deletions.
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

0 comments on commit 54c9efc

Please sign in to comment.