Code Monkey home page Code Monkey logo

valhalla-operator's Introduction

Valhalla Kubernetes Operator

A kubernetes operator to deploy and manage Valhalla routing engine. This operator efficiently deploys Valhalla instances by sharing map data accross all pods of a specific instance.

Quickstart

First, make sure you have a running Kubernetes cluster and kubectl installed to access it. Then run the following command to install the operator:

kubectl apply -f https://github.com/itayankri/valhalla-operator/releases/latest/download/valhalla-operator.yaml

Then you can deploy a Valhalla instance:

kubectl apply -f https://github.com/itayankri/valhalla-operator/blob/master/examples/example.yaml

For a full setup from scratch checkout this Medium.

Pausing the Operator

The reconciliation can be paused by adding the following annotation to the Valhalla resource:

valhalla.itayankri/operator.paused: "true"

The operator will not react to any changes to the Valhalla resource or any of the watched resources. If a paused Valhalla resource is deleted, the dependent resources will still be cleaned up because thay all have an ownerReference.

valhalla-operator's People

Contributors

davidpeck-littlemonkey avatar dependabot[bot] avatar itayankri avatar nospi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

valhalla-operator's Issues

Operator doesn't support Kubernetes v1.25

Currently seeing a whole bunch of these issues when installing in a 1.25 Kubernetes cluster


1.6853808173379152e+09  ERROR   controller-runtime.source       if kind is a CRD, it should be installed before calling Start   {"kind": "PodDisruptionBudget.policy", "error": "no matches for kind \"PodDisruptionBudget\" in version \"policy/v1beta1\""}
sigs.k8s.io/controller-runtime/pkg/source.(*Kind).Start.func1.1
        /go/pkg/mod/sigs.k8s.io/[email protected]/pkg/source/source.go:139
k8s.io/apimachinery/pkg/util/wait.runConditionWithCrashProtectionWithContext
        /go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/wait.go:235
k8s.io/apimachinery/pkg/util/wait.poll
        /go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/wait.go:582
k8s.io/apimachinery/pkg/util/wait.PollImmediateUntilWithContext
        /go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/wait.go:547
sigs.k8s.io/controller-runtime/pkg/source.(*Kind).Start.func1
        /go/pkg/mod/sigs.k8s.io/[email protected]/pkg/source/source.go:132
1.6853808280473073e+09  ERROR   controller-runtime.source       if kind is a CRD, it should be installed before calling Start   {"kind": "PodDisruptionBudget.policy", "error": "no matches for kind \"PodDisruptionBudget\" in version \"policy/v1beta1\""}
sigs.k8s.io/controller-runtime/pkg/source.(*Kind).Start.func1.1
        /go/pkg/mod/sigs.k8s.io/[email protected]/pkg/source/source.go:139
k8s.io/apimachinery/pkg/util/wait.runConditionWithCrashProtectionWithContext
        /go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/wait.go:235
k8s.io/apimachinery/pkg/util/wait.WaitForWithContext
        /go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/wait.go:662
k8s.io/apimachinery/pkg/util/wait.poll
        /go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/wait.go:596
k8s.io/apimachinery/pkg/util/wait.PollImmediateUntilWithContext
        /go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/wait.go:547
sigs.k8s.io/controller-runtime/pkg/source.(*Kind).Start.func1
        /go/pkg/mod/sigs.k8s.io/[email protected]/pkg/source/source.go:132
1.6853808380448074e+09  ERROR   controller-runtime.source       if kind is a CRD, it should be installed before calling Start   {"kind": "PodDisruptionBudget.policy", "error": "no matches for kind \"PodDisruptionBudget\" in version \"policy/v1beta1\""}
sigs.k8s.io/controller-runtime/pkg/source.(*Kind).Start.func1.1
        /go/pkg/mod/sigs.k8s.io/[email protected]/pkg/source/source.go:139
k8s.io/apimachinery/pkg/util/wait.runConditionWithCrashProtectionWithContext
        /go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/wait.go:235
k8s.io/apimachinery/pkg/util/wait.WaitForWithContext
        /go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/wait.go:662
k8s.io/apimachinery/pkg/util/wait.poll
        /go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/wait.go:596
k8s.io/apimachinery/pkg/util/wait.PollImmediateUntilWithContext
        /go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/wait.go:547
sigs.k8s.io/controller-runtime/pkg/source.(*Kind).Start.func1
        /go/pkg/mod/sigs.k8s.io/[email protected]/pkg/source/source.go:132
1.6853808480458229e+09  ERROR   controller-runtime.source       if kind is a CRD, it should be installed before calling Start   {"kind": "PodDisruptionBudget.policy", "error": "no matches for kind \"PodDisruptionBudget\" in version \"policy/v1beta1\""}
sigs.k8s.io/controller-runtime/pkg/source.(*Kind).Start.func1.1
        /go/pkg/mod/sigs.k8s.io/[email protected]/pkg/source/source.go:139
k8s.io/apimachinery/pkg/util/wait.runConditionWithCrashProtectionWithContext
        /go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/wait.go:235
k8s.io/apimachinery/pkg/util/wait.WaitForWithContext
        /go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/wait.go:662
k8s.io/apimachinery/pkg/util/wait.poll
        /go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/wait.go:596
k8s.io/apimachinery/pkg/util/wait.PollImmediateUntilWithContext
        /go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/wait.go:547
sigs.k8s.io/controller-runtime/pkg/source.(*Kind).Start.func1
        /go/pkg/mod/sigs.k8s.io/[email protected]/pkg/source/source.go:132

PodDisruptionBudget has been moved to policy/v1

"error_code": 171 using AWS EFS

Hey there @itayankri,

I'm not using your operator, but the idea of using an NFS. However, depending on the tile set and it's size on the volume the valhalla instance would respond with:

{
            "error_code": 171,
            "error": "No suitable edges near location",
            "status_code": 400,
            "status": "Bad Request"
}

approximately 50% of the time and correctly with a route the other 50%.

I was thinking it is the added latency of the NFS that would cause valhalla to timeout on I/O and respond with 171 as above. Have you ever encountered anything like it? Maybe you @dmipeck?

No such node (service_limits.max_timedep_distance_matrix.max_locations)

I'm trying to run Valhalla from the example (quickstart guide), and I'm getting the following error:

% kubectl get pods -n valhalla-system
valhalla-controller-manager-596f67cf87-flbwb 2/2 Running
valhalla-test-instance-builder-2kk4t 0/1 Completed
valhalla-test-instance-cdc95f68-chz2w 0/1 CrashLoopBackOff

% kubectl logs -n valhalla-system valhalla-test-instance-cdc95f68-chz2w -f
Starting Valhalla server with 2 threads...
2023/10/30 06:31:49.091475 [INFO] Tile extract successfully loaded with tile count: 42
2023/10/30 06:31:49.091477 [INFO] Tile extract successfully loaded with tile count: 42
2023/10/30 06:31:49.091619 [WARN] (stat): /data/traffic.tar No such file or directory
2023/10/30 06:31:49.091622 [WARN] (stat): /data/traffic.tar No such file or directory
2023/10/30 06:31:49.091634 [WARN] Traffic tile extract could not be loaded
2023/10/30 06:31:49.091624 [WARN] Traffic tile extract could not be loaded
2023/10/30 06:31:49.096651 [INFO] Tile extract successfully loaded with tile count: 42
2023/10/30 06:31:49.096702 [WARN] (stat): /data/traffic.tar No such file or directory
2023/10/30 06:31:49.096707 [WARN] Traffic tile extract could not be loaded
2023/10/30 06:31:49.097019 [INFO] Tile extract successfully loaded with tile count: 42
2023/10/30 06:31:49.097062 [WARN] (stat): /data/traffic.tar No such file or directory
2023/10/30 06:31:49.097067 [WARN] Traffic tile extract could not be loaded

terminate called after throwing an instance of 'boost::wrapexceptboost::property_tree::ptree_bad_path'
terminate called recursively
what(): No such node (service_limits.max_timedep_distance_matrix.max_locations)
/run.sh: line 14: 7 Aborted (core dumped) valhalla_service ./$CONF_DIR/valhalla.json $THREADS

Kubernetes version: 1.23.1
Valhalla operator:1.4.0

Valhalla instance not starting after builder finishes

Hi,

I am trying to set up the operator and instances, and get stuck after building has completed.

The last log message of the builder is:
[INFO] Finished with 87683 nodes
and I would expect a Valhalla pod to start up afterwards, but nothing happens.

Running kubectl get all -n valhalla-system returns the following, showing no indication of a Valhalla pod attempting to start up:

> kubectl get all -n valhalla-system
NAME                                              READY   STATUS    RESTARTS   AGE
pod/valhalla-builder-gv98m                        1/1     Running   0          5m12s
pod/valhalla-controller-manager-775677bc4-zlr9b   2/2     Running   0          6m22s

NAME                                                  TYPE        CLUSTER-IP    EXTERNAL-IP   PORT(S)    AGE
service/valhalla-controller-manager-metrics-service   ClusterIP   10.0.41.170   <none>        8443/TCP   6m23s

NAME                                          READY   UP-TO-DATE   AVAILABLE   AGE
deployment.apps/valhalla-controller-manager   1/1     1            1           6m23s

NAME                                                    DESIRED   CURRENT   READY   AGE
replicaset.apps/valhalla-controller-manager-775677bc4   1         1         1       6m23s

NAME                         COMPLETIONS   DURATION   AGE
job.batch/valhalla-builder   0/1           5m12s      5m12s
>

I am running the latest version of the operator (1.4.0), on Azure Kubernets Service (AKS) version 1.25.6.
The StorageClass I am using is "Azure File CSI standard" with retain policy and "ReadWriteMany".

Neither the operator nor the builder are showing any errors.

Is there anything I can do to solve this or debug the issue?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.