linstor-scheduler-extender

command module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 8, 2022 License: Apache-2.0 Imports: 22 Imported by: 0

README

linstor-scheduler-extender

Latest release

LINSTOR scheduler extender plugin for Kubernetes which allows a storage driver to give the Kubernetes scheduler hints about where to place a new pod so that it is optimally located for storage performance.

Get started

If you want to get started directly with an existing LINSTOR setup, check out the single file deployment The deployment will create:

  • All needed RBAC resources
  • A Deployment spawning 2 replicas of the Kube-scheduler with linstor-scheduler-existing, configured to connect to http://piraeus-op-cs.default.svc

Copy the file, make any desired changes (see the options below) and apply:

$ kubectl apply -f deploy/all.yaml
configmap/linstor-scheduler created
deployment.apps/linstor-scheduler created
serviceaccount/linstor-scheduler created
clusterrole.rbac.authorization.k8s.io/linstor-scheduler created
role.rbac.authorization.k8s.io/linstor-scheduler created
clusterrolebinding.rbac.authorization.k8s.io/linstor-scheduler created
rolebinding.rbac.authorization.k8s.io/linstor-scheduler created

$ kubectl -n kube-system get pods -l app.kubernetes.io/name=linstor-scheduler
NAME                                 READY   STATUS    RESTARTS   AGE
linstor-scheduler-6bb88fc66c-bq4fm   2/2     Running   0          52s
linstor-scheduler-6bb88fc66c-tllgm   2/2     Running   0          52s

Usage

To make your applications using linstor-scheduler, use the schedulerName: linstor field. For example, Pod Templates in a StatefulSet should look like:

apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: my-stateful-app
spec:
  serviceName: my-stateful-app
  selector:
    matchLabels:
      app.kubernetes.io/name: my-stateful-app
  template:
    metadata:
      labels:
        app.kubernetes.io/name: my-stateful-app
    spec:
      schedulerName: linstor
    ...

Configuration

linstor-scheduler-extender uses the environment variables specified in the golinstor library for configuration.

Variable Description
LS_CONTROLLERS A comma-separated list of LINSTOR controller URLs to connect to.
LS_USERNAME Username to use for HTTP basic auth.
LS_PASSWORD Password to use for HTTP basic auth.
LS_ROOT_CA CA certificate to use for authenticating the server.
LS_USER_KEY TLS key to use for authenticating the client to the server.
LS_USER_CERTIFICATE TLS certificate to use for authenticating the client to the server.

The linstor-scheduler-extender itself can be configured using the following flags:

--verbose      Enable verbose logging

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
cmd
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL