Giter Site home page Giter Site logo

shikharcodes / k8gb-lite Goto Github PK

View Code? Open in Web Editor NEW

This project forked from k8gb-io/k8gb-lite

0.0 0.0 0.0 590 KB

POC k8gb reduced by CRD; besides CRD it also reduces the number of reconciliations and allows easy add new providers such as Gateway or Service.

Go 95.41% Makefile 3.25% Dockerfile 0.48% Mustache 0.85%

k8gb-lite's Introduction

k8gb-light

POC k8gb reduced by CRD. Besides CRD it also reduces the number of reconciliations and provides new providers as Gateway.

see 🚨Changes which contain more detailed information about the changes.

running locally

Environments

Locally create three test clusters by displaying make-deploy-full-local-setup. All clusters will have the current version of k8gb installed from your local Git branch.

Test application

To install the application, use make deploy-demo

Terratests

Run make terratest.

If you need to reset the environment, use the commands make clean-namespaces, make deploy-full-local-clusters, make redeploy-clusters

Ingress

If k8gb is successfully installed, you only need to add the annotation to ingress and load-balancing will be enabled.

  • k8gb.io/strategy is mandatory
  • k8gb.io/status is out only information written by controller back to ingress. The value represents the state of the host application on each cluster.
  • k8gb.io/primary-geotag is used if k8gb.io/strategy is failover. Defines primary cluster and all substitutes within the list. Substitutes that are not defined are automatically ordered alphabetically e.g: for clusters us,uk,za,cn,eu,k8gb.io/primary-geotag: us,eu the clusters are selected in the following order us,eu,cn,uk,za
  • k8gb.io/weights is list containing key-values for the weights of the individual regions e.g: k8gb.io/weights: "eu:4,us:5,za:2". Weights are applied if k8gb.io/strategy is roundRobin.

Other annotations are k8gb.io/splitbrain-threshold-seconds and k8gb.io/dns-ttl-seconds

kind: Ingress
metadata:
  annotations:
    k8gb.io/dns-ttl-seconds: "351"
    k8gb.io/status: '{"serviceHealth":{"demo.cloud.example.com":"Healthy"},"healthyRecords":{"demo.cloud.example.com":["172.18.0.5","172.18.0.6","172.18.0.3","172.18.0.4"]},"geoTag":"us","hosts":"demo.cloud.example.com"}'
    k8gb.io/strategy: roundRobin
    kubectl.kubernetes.io/last-applied-configuration: |
      {"apiVersion":"networking.k8s.io/v1","kind":"Ingress","metadata":{"annotations":{"k8gb.io/strategy":"roundRobin","x.y.io/ep":"[{\"addresses\":[\"1.2.3.4\"],\"port\":80}]","xxx":"xxx"},"name":"ing","namespace":"demo"},"spec":{"ingressClassName":"nginx","rules":[{"host":"demo.cloud.example.com","http":{"paths":[{"backend":{"service":{"name":"frontend-podinfo","port":{"name":"http"}}},"path":"/","pathType":"Prefix"}]}}]}}
  endpoints:
  - dnsName: localtargets-demo.cloud.example.com
    recordTTL: 351
    recordType: A
    targets:
    - 172.18.0.5
    - 172.18.0.6
  - dnsName: demo.cloud.example.com
    labels:
      strategy: roundRobin
    recordTTL: 351
    recordType: A
    targets:
    - 172.18.0.5
    - 172.18.0.6
    - 172.18.0.3
    - 172.18.0.4

k8gb-lite's People

Contributors

kuritka avatar

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.