Code Monkey home page Code Monkey logo

s1p_gateway's Introduction

S1P :: Gateway

Based on the new Spring Cloud Gateway, configured to use the Spring Cloud Kubernetes Discovery and Config modules to automatically register routes to (k8s) services matching with the following SPEL Filter: metadata.labels['s1p'] = true

Only if the services contain this label will be automatically registered and the gateway will forward requests to them.

    <dependency>
        <groupId>org.springframework.cloud</groupId>
        <artifactId>spring-cloud-starter-gateway</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.cloud</groupId>
        <artifactId>spring-cloud-kubernetes-discovery</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.cloud</groupId>
        <artifactId>spring-cloud-kubernetes-config</artifactId>
    </dependency>

You can also find inside the charts/s1p-gateway/templates directory the descriptors needed to deploy this gateway and to grant access to the Kubernetes APIs. The Role, RoleBinding and Services accounts are configured to enable the deployed container to access the Kubernetes APIs from inside a Pod.

s1p_gateway's People

Contributors

pow-devops2020 avatar salaboy avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

s1p_gateway's Issues

spring-cloud-gateway in GKE

I was planning to install spring-cloud-gateway in gke. Can this be considered a template project ?
Is spring-cloud-gateway configured as an ingress controller ?
Will this automatically connect to other spring boot apps/services defined in gke
How to deploy this gateway in gke ?
Any tools needed ?

Discovery Service Filter not working

The gateway works fine when I don't add the discovery filter property, as it picks up all services in my cluster and creates routes to them. However, when I add the property:

spring:
    cloud:
        kubernetes:
            discovery:
                filter: "metadata.labels['s1p']"

and change my service that I want to picked up from the gateway to have a label in the metadata to have s1p: "true", nothing gets picked up and I get this error instead:

org.springframework.expression.spel.SpelEvaluationException: EL1012E: Cannot index into a null value

Any ideas on what I could be doing wrong?

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.