commit | 0cfde298ebd9590c0baf7703e49bb1b4db883894 | [log] [tgz] |
---|---|---|
author | Kinga Marton <kmarton@cloudera.com> | Tue Jul 21 03:43:18 2020 +0200 |
committer | Weiwei Yang <wyang@cloudera.com> | Mon Jul 27 10:43:54 2020 -0700 |
tree | 4774757ff0c9c38e835ad188d2af86de6d5f2481 | |
parent | a1fddd2af4c500f8aa5f7ea5e8275b9146f19d7e [diff] |
[YUNIKORN-269] Editing yunikorn configmaps fails with host "yunikorn-service.yunikorn.svc" resolution error (#159) The validation of configmap updates was failing constantly after the admission-controller pod runs with the host network. This fix sets the dns policy explicitly to ClusterFirstWithHostNet in order to access the scheduler rest endpoint.
YuniKorn scheduler shim for kubernetes is a customized k8s scheduler, it can be deployed in a K8s cluster and work as the scheduler. This project contains the k8s shim layer code for k8s, it depends on yunikorn-core
which encapsulates all the actual scheduling logic. By default, it handles all pods scheduling if pod's spec has field schedulerName: yunikorn
.
For detailed information on how to build the overall scheduler please see the build document in the yunikorn-core
.
This component build should only be used for development builds. Prerequisites and build environment setup is described in the above mentioned build document.
The simplest way to get a local binary that can be run on a local Kubernetes environment is:
make build
This command will build a binary k8s_yunikorn_scheduler
under _output/bin
dir. This binary is executable on local environment, as long as kubectl
is properly configured. Run ./k8s_yunikorn_scheduler -help
to see all options.
Note: It may take few minutes to run this command for the first time, because it needs to download all dependencies. In case you get an error relating to checksum mismatch
, run go clean -modcache
and then rerun make build
.
If the local kubernetes environment is up and running you can build and run the binary via:
make run
This will build the code, and run the scheduler with verbose logging. It will set the configuration for the scheduler to the provided default configuration queues.yaml
and uses the current setup for kubernetes.
Unit tests for the shim only can be run via:
make test
Any changes made to the shim code should not cause any existing tests to fail.
Build docker image can be triggered by running following command.
make image
You can set REGISTRY
and VERSION
in the commandline to build docker image with a specified tag and version. For example,
make image REGISTRY=yunikorn VERSION=latest
This command will build a binary executable with version latest
and the docker image tag is yunikorn/yunikorn:scheduler-latest
.
You can run following command to retrieve the meta info for a docker image build, such as component revisions, date of the build, etc.
docker inspect --format='{{.Config.Labels}}' yunikorn/yunikorn:scheduler-latest
All design documents are located in a central location per component. The core component design documents also contains the design documents for cross component designs. List of design documents for the k8s-shim.
See how to contribute code in this guide.