sidecar | Docker native | Proxy library

 by   newrelic Go Version: v2.0.1 License: MIT

kandi X-RAY | sidecar Summary

kandi X-RAY | sidecar Summary

sidecar is a Go library typically used in Networking, Proxy, Docker applications. sidecar has no bugs, it has no vulnerabilities, it has a Permissive License and it has low support. You can download it from GitHub.

Gossip-based service discovery. Docker native, but supports static discovery, too.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              sidecar has a low active ecosystem.
              It has 252 star(s) with 30 fork(s). There are 27 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 1 open issues and 8 have been closed. On average issues are closed in 6 days. There are 1 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of sidecar is v2.0.1

            kandi-Quality Quality

              sidecar has no bugs reported.

            kandi-Security Security

              sidecar has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.

            kandi-License License

              sidecar is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              sidecar releases are not available. You will need to build from source code and install.
              Installation instructions are not available. Examples and code snippets are available.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of sidecar
            Get all kandi verified functions for this library.

            sidecar Key Features

            No Key Features are available at this moment for sidecar.

            sidecar Examples and Code Snippets

            No Code Snippets are available at this moment for sidecar.

            Community Discussions

            QUESTION

            flag redefined: Can two components have same flag variable
            Asked 2021-Jun-07 at 05:47

            I have a deployment with 5 containers. Among them two of them have --endpoint as argument for which value is set from ENV

            So I see this error after deployment

            ...

            ANSWER

            Answered 2021-Jun-07 at 05:17

            It has nothing to do with the different containers. Whichever process is crashing is just broken, the code has a bug where it registers the same flag twice which isn't allowed.

            Source https://stackoverflow.com/questions/67866087

            QUESTION

            create an ip alias for a sidecar
            Asked 2021-Jun-06 at 17:51

            We have a sidecar running an API at localhost:myportnumber (lets say 8888 for this example), and we are trying to reference it from the main container in the same pod.

            Does the main container need to be aware of the port the sidecar is running on? (like by creating an environment variable equal to 8888?)

            Or is there a convenient way we can reference the sidecar using something similar to cluster ip (like namespace.servicename.sidecarname), or by creating a HostAlias?

            ...

            ANSWER

            Answered 2021-Jun-06 at 17:51

            Does the main container need to be aware of the port the sidecar is running on? (like by creating an environment variable equal to 8888?)

            Yes , sidecar containers share same network(IP,namespace) so you have to make main container aware of the port number on which it can reach the sidecar container.

            is there a convenient way we can reference the sidecar using something similar to cluster ip (like namespace.servicename.sidecarname), or by creating a HostAlias?

            I think DNS/similar things cannot be extended to containers that are running inside pods . because as mentioned above all the contianers inside a pod share same nework(IP , Network namespace)

            Source https://stackoverflow.com/questions/67860324

            QUESTION

            How can I join a Consul agent to a Consul cluster via a Consul server running in a different Fargate task with CloudFormation?
            Asked 2021-Jun-04 at 22:08

            I'm currently working as an intern and have to host a microservice application. I chose to use AWS ECS in combination with Fargate tasks to host a Consul Connect Service Mesh that provides service discovery, intentions, Mtls and so on for the application. My set-up is as follows:

            • 1 Fargate task (in a service) with a Consul server container.
            • x Fargate tasks (in a service) with a Consul agent, Consul Connect sidecar and a microservice container.

            I am using CloudFormation to deploy that infrastructure automatically.

            The problem:

            I need to join the Consul agent running in one Fargate-task to the Consul cluster started in another Fargate task (task of the server) using CloudFormation. The problem I have with doing that is that I did not find any way to get the IP address to join the agent to the cluster.

            Does anyone know how I can get the IP address of a Fargate task in CloudFormation or the best practice way of doing this?

            If I am not mistaken you can only join a Consul agent to a Consul cluster using IP, DNS name or Cloud metadata. The first and second one I could not retrieve using CloudFormation and for the third one I found that it might not be possible (I could be wrong, but thats what I read so far).

            Also I tried both the Consul agent -ui [...] -join and -retry-join flag, but neither one worked. I also tried creating an internal loadbalancer for the task with the Consul server from which I used the DNS name to try to join the Cluster, but that did not work either (I have never set-up a loadbalancer properly on AWS yet so I might have done that wrong). I tried that with the loadbalancer forwarding traffic to port 8500 (which was the wrong port I think) and afterwards with port 8301 (which I think was the right port). But I kept getting the message that there was no Consul Cluster on that address.

            Can anyone tell me how I can proceed?

            Thank you in advance!

            ...

            ANSWER

            Answered 2021-Jun-04 at 22:08

            Thanks to a very smart colleague of mine, I found that putting a load balancer (which I set up wrong earlier) in front of the ECS service with the Consul Server Fargate task solved my problem. The load balancer listener should listen on the SERF port 8301 tcp_udp and forward traffic to the service with that protocol and port.

            Source https://stackoverflow.com/questions/67331638

            QUESTION

            Unable to invoke another service with Dapr
            Asked 2021-May-28 at 15:44

            I'm having major problems getting Dapr up and running with my microservices. Every time I try to invoke another service, it returns a 500 error with the message

            ...

            ANSWER

            Answered 2021-May-28 at 15:44

            Actually turned out to be quite simple.

            I needed to tell dapr to use ssl. The clients-dapr needed the -app-ssl parameter so clients-dapr should have been as follows (the simpleapi-dapr needs the same param adding too)

            Source https://stackoverflow.com/questions/67741216

            QUESTION

            How to set up dapr and docker compose with state management
            Asked 2021-May-21 at 19:29

            Very new to dapr and docker.

            I followed along the dapr getting started. The simple hello world state management example worked fine. Yes Bruce, we all know you are Batman.

            So next I built the weather forecast multi-container example for .NET Core. This worked beautifully. (I named my front-end razor pages "wxui" and the back-end webapi "wxapi").

            Finally, I wanted to try my hand at adding state management to the weather forecaster example. I modified the front-end Razor Pages app to store and retrieve a bit of state and added a redis container to my docker-compose file.

            Things are not going well.

            The wxui-dapr container is exiting with this message:

            time="2021-05-20T22:47:50.3179068Z" level=fatal msg="process component statestore error: redis store: error connecting to redis at localhost:6379: dial tcp 127.0.0.1:6379: connect: connection refused" app_id=wxui instance=69254f9724b0 scope=dapr.runtime type=log ver=1.1.2

            I'm going to guess that the dapr sidecar container is not mapping local port 6379 to the redis container. But I have no idea how to test or fix that.

            Here's my docker-compose.yml file, if that's useful:

            ...

            ANSWER

            Answered 2021-May-21 at 19:29

            So in my limited environment, using my very limited understanding of docker networking, I was able to make it work. Please feel free to offer better solutions!

            I ended up changing the docker-compose.yml file to give the redis container a hostname:

            Source https://stackoverflow.com/questions/67629176

            QUESTION

            IstioOperator and sidecar autoinjection
            Asked 2021-May-10 at 08:16

            How to enable sidecar injection using IstioOperator? This is my config and it is not enough for that.

            ...

            ANSWER

            Answered 2021-May-07 at 09:12

            Auto injection is enabled by default.

            Source https://stackoverflow.com/questions/67430525

            QUESTION

            error converting YAML to JSON: mapping values are not allowed in this context
            Asked 2021-May-08 at 09:15

            I'm using helm3. My kubernetes deployment get crashed on 43 line of code below.

            Error in console: error converting YAML to JSON: mapping values are not allowed in this context

            yaml lint says this: (): found unexpected ':' while scanning a plain scalar at line 43 column 19

            Whats wrong with that line?

            wrong one:

            ...

            ANSWER

            Answered 2021-Apr-30 at 13:43

            QUESTION

            Allowing K8S daemonset to exist in the global pid namespace
            Asked 2021-May-06 at 10:39

            I'm trying to configure a daemonset to run on the global pid namespace resulting the ability to see other processes in the host, including the containers' processes.

            I couldn't find an option to achieve this. In general, what I'm looking for is close to the sidecar container shareProcessNamespace attribute only on the host level.

            ...

            ANSWER

            Answered 2021-May-06 at 10:39

            There is an attribute that allows this - hostPID: true

            So the yaml file should looks something like that:

            Source https://stackoverflow.com/questions/67414394

            QUESTION

            Using docker Container links in Jenkins
            Asked 2021-May-03 at 16:25

            I am trying to run a CI system which works for DB migration scripts. So this could prevent us from running sql scripts which do not work at the migration time because of syntax errors. For our local setup we use docker-compose and run multiple containers at a time. This is unfortunately not an option for us in Jenkins pipeline

            I created this Jenkinsfile with the following strategy.

            1. A postgres container is run with more or less default parameters
            2. Another postgres container is linked to the first container, only to use pg_isready commandline to wait until the DB is ready to take connections
            3. Use flyway container to run DB migrations against the DB setup in step 1. Eventually planned to run E2E tests also with web applications

            My implementation is based on the documentation here (running docker sidecar). However, this is not working and the first container (step 1) seems to be stopping. I added some additional debugging (try catch) to see the logs of this container

            Content of my Jenkinsfile

            ...

            ANSWER

            Answered 2021-Apr-13 at 20:33

            A possible root cause, assuming you are using the official postgres docker image, is that the container's entrypoint's script is failing.

            From the image's Docker page:

            Warning: scripts in /docker-entrypoint-initdb.d are only run if you start the container with a data directory that is empty; [...] One common problem is that if one of your /docker-entrypoint-initdb.d scripts fails (which will cause the entrypoint script to exit) and your orchestrator restarts the container with the already initialized data directory, it will not continue on with your scripts

            Solution

            Assuming that the entrypoint process is indeed failing (probably because it sees a DB that is not owned and is designed by entrypoint to override it, since it's linked to another postgres container), you can overcome this by setting your own entrypoint and cmd, thus preventing the image from trying to create a db that you are not going to use anyway, i.e.:

            Source https://stackoverflow.com/questions/66893125

            QUESTION

            EKS - Envoy dynamic forward proxy CA validation error
            Asked 2021-May-03 at 06:57

            im trying to setup a forward-proxy within eks, using an envoy sidecar-containers, which is supposed to conduct TLS origination; I.e. the envoy gets a http-request from the main-container, performs ssl-encryption and validates the ca using the file ca-certificates.crt. The envoy-configuration is based on the official documentation (https://www.envoyproxy.io/docs/envoy/latest/configuration/http/http_filters/dynamic_forward_proxy_filter#config-http-filters-dynamic-forward-proxy).

            The envoy mounts the ca-file ca-certificates.crt from aws secrets manager to /etc/cert-volume/ca-certificates.crt, which seems to work, since the file exists within the container.

            The ca-certificates.crt file seems to be valid as well, since the following cmd, run from my local machine, gives a HTTP 302 Found (remote wget doesnt support --ca-certificate parameter):

            ...

            ANSWER

            Answered 2021-May-03 at 06:57

            Problem is solved. ca-certificates.crt was missing a required CA. I dont know why wget didnt throw an exception, however openssl did...

            Source https://stackoverflow.com/questions/67267833

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install sidecar

            You can download it from GitHub.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/newrelic/sidecar.git

          • CLI

            gh repo clone newrelic/sidecar

          • sshUrl

            git@github.com:newrelic/sidecar.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Explore Related Topics

            Consider Popular Proxy Libraries

            frp

            by fatedier

            shadowsocks-windows

            by shadowsocks

            v2ray-core

            by v2ray

            caddy

            by caddyserver

            XX-Net

            by XX-net

            Try Top Libraries by newrelic

            centurion

            by newrelicRuby

            newrelic-ruby-agent

            by newrelicRuby

            node-newrelic

            by newrelicJavaScript

            go-agent

            by newrelicGo

            rusty-hog

            by newrelicRust