GithubHelp home page GithubHelp logo

kong-client-ruby's Introduction

Kontena Classic

IMPORTANT! This project is deprecated. Please see Kontena Pharos - The Simple, Solid, Certifified Kubernetes Distribution That Just Works!

Build Status Join the chat at https://slack.kontena.io

Kontena Classic is a developer friendly, open source platform for orchestrating applications that are run on Docker containers. It simplifies deploying and running containerized applications on any infrastructure. By leveraging technologies such as Docker, Container Linux and Weave Net, it provides complete solution for organizations of any size.

Kontena Classic is built to maximize developer happiness; it is designed for application developers and therefore does not require ops teams to setup or maintain. Therefore, it is an ideal choice for organizations without aspiration to configure and maintain scalable Docker container infrastructure.

Kontena Classic Introduction

To accelerate and break barriers for containerized application development, Kontena Classic features some of the most essential technologies built-in such as:

  • Multi-host, multi AZ container orchestration
  • Overlay network technology by Weaveworks
  • Zero-downtime dynamic load balancing
  • Abstraction to describe services running in containers
  • Private Docker image repository
  • Kontena Vault - a secure storage for managing secrets
  • VPN access to backend containers
  • Heroku-like application deployment workflow

Kontena Classic supports any application that can run in a Docker container, and can run on any machine that supports CoreOS. You can run Kontena on the cloud provider of your choice or on your own servers. We hope you enjoy!

Learn more about Kontena:

Getting Started

Please see our Quick Start guide.

Contact Us

Found a bug? Suggest a feature? Have a question? Please submit an issue or email us at [email protected].

Follow us on Twitter: @KontenaInc.

Slack: Join the Kontena Community Slack channel.

License

Kontena Classic software is open source, and you can use it for any purpose, personal or commercial. Kontena is licensed under the Apache License, Version 2.0. See LICENSE for full license text.

kong-client-ruby's People

Contributors

amireh avatar arthurmde avatar daniel-bytes avatar dazoakley avatar efesto avatar gabrie30 avatar ltran avatar matti avatar mtmail avatar nevalla 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  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

kong-client-ruby's Issues

Cannot redefine api_url

Hello,

As said in the doc, it should be possible to override the default kong_url with this code

Kong::Client.api_url = 'http://your-kong-url:8001'

However, this does not work. The api_url attribute is changed, but the Excon http_client is not updated as it is called only once in Kong::Client#initialize

This results in using the default kong url http://localhost:8001 and not the one set in api_url attribute

LoadError: cannot load such file -- gems/kong-0.3.3/lib/kong/service

When I try to load the last version (0.3.3) of the gem, installed from rubygems, it launches the below error:

$ bundle exec rake assets:precompile
rake aborted!
LoadError: cannot load such file -- /Users/x/.rvm/gems/ruby-2.5.0@global/gems/kong-0.3.3/lib/kong/service
/Users/x/.rvm/gems/ruby-2.5.0@global/gems/kong-0.3.3/lib/kong.rb:5:in `require_relative'
/Users/x/.rvm/gems/ruby-2.5.0@global/gems/kong-0.3.3/lib/kong.rb:5:in `<top (required)>'
...
(See full trace by running task with --trace)

The file lib/kong.rb installed on my machine is pretty different from the one in the repository.

Cannot set methods when creating API

When adding an API in Kong v0.11.0 there is a semi-optional value methods which is a comma-separated list of HTTP methods that point to the API.

Unable to retrieve JWTs with a Consumer that only has a custom_id

If I create a Kong consumer using only a custom_id (so have no username) I'm unable to retrieve that consumers JWTs using Kong::Consumer.find_by_custom_id("foo").jwts.

I did some digging and in lib/kong/consumer.rb line 94, the client call to get the JWTs is usingclient.get("#{@api_end_point}#{self.username}/jwt") but because username is nil nothing is returned.

Should (or could) this be more like client.get("#{@api_end_point}#{self.username || self.custom_id}/jwt")?

Cannot delete a consumer without a custom_id

Hello,

I tried to call the delete method on a consumer object but it crashed :
Kong::Error: {"message":"An unexpected error occurred"}

The SQL log of my kong server displays :

db_1      | ERROR:  operator does not exist: text = boolean at character 270
db_1      | HINT:  No operator matches the given name and argument type(s). You might need to add explicit type casts.
db_1      | STATEMENT:  SELECT COUNT(*) FROM oauth2_tokens LEFT OUTER JOIN ttls ON (oauth2_tokens.id = ttls.primary_uuid_value) WHERE
db_1      | 	    (ttls.primary_key_value IS NULL OR (ttls.table_name = 'oauth2_tokens' AND expire_at > CURRENT_TIMESTAMP(0) at time zone 'utc')) AND "authenticated_userid" = TRUE

After some investigation, I found what caused the issue : https://github.com/kontena/kong-client-ruby/blob/master/lib/kong/consumer.rb#L68

Since the consumer object I'm working on, does not have a custom_id attribute set, this method send {authenticated_userid:nil } as params which will then be encoded as "authenticated_userid" and then seems to be evaluted to TRUE in PostgreSQL.

I don't know what would be the best way to solve this issue :

  • Edit the Kong::Client#encode_params method to return "param_name=null" in case of nil values.
  • Not sending the authenticated_userid param if custom_id is nil in Kong::Consumer#oauth_tokens method

What do you think ?

Thank you for your work on this gem by the way :)

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.