Git Product home page Git Product logo

namerctl's Introduction

linkerd

GitHub license Circle CI Slack Status Docker Pulls CII Best Practices

This repo is for the 1.x version of Linkerd. Feature development is now happening in the linkerd2 repo. This repo is currently only used for periodic maintenance releases of Linkerd 1.x.

Linkerd 1.x (pronounced "linker-DEE") acts as a transparent HTTP/gRPC/thrift/etc proxy, and can usually be dropped into existing applications with a minimum of configuration, regardless of what language they're written in. It works with many common protocols and service discovery backends, including scheduled environments like Nomad, Mesos and Kubernetes.

Linkerd is built on top of Netty and Finagle, a production-tested RPC framework used by high-traffic companies like Twitter, Pinterest, Tumblr, PagerDuty, and others.

Linkerd is hosted by the Cloud Native Computing Foundation (CNCF).

Want to try it?

We distribute binaries which you can download from the Linkerd releases page. We also publish Docker images for each release, which you can find on Docker Hub.

For instructions on how to configure and run Linkerd, see the 1.x user documentation on linkerd.io.

Working in this repo

BUILD.md includes general information on how to work in this repo. Additionally, there are documents on how to build several of the application subprojects:

  • linkerd -- produces linkerd router artifacts
  • namerd -- produces namerd service discovery artifacts
  • grpc -- produces the protoc-gen-io.buoyant.grpc code generator

We ❤️ pull requests! See CONTRIBUTING.md for info on contributing changes.

Related Repos

  • linkerd2: The main repo for Linkerd 2.x and where current development is happening.
  • linkerd-examples: A variety of configuration examples and explanations
  • linkerd-tcp: A lightweight TCP/TLS load balancer that uses Namerd
  • linkerd-viz: Zero-configuration service dashboard for Linkerd
  • linkerd-zipkin: Zipkin tracing plugins
  • namerctl: A commandline utility for controlling Namerd

Code of Conduct

This project is for everyone. We ask that our users and contributors take a few minutes to review our code of conduct.

License

Copyright 2018, Linkerd Authors. All rights reserved.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use these files except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

namerctl's People

Contributors

adleong avatar klingerf avatar njoyce avatar olix0r avatar pcalcado avatar siggy avatar utrack 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

Watchers

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

namerctl's Issues

Support for HTTPS

Problem Statement:

rajk00071 [10:20 AM]
can namerctl handle base url with https endpoint
[10:20]
i am getting /api/1/dtabs: x509: certificate signed by unknown authority
[10:20]
although i know my certs are valid

Answer:

olix0r [11:08 AM]
hmm. namerctl may not handle that properly yet. sounds like a good PR though!


Since it was suggested, I just wanted to throw this issue on here so that we could track it in case anyone else was having similar issues, or has solved it already.

Standardize `namerctl dtab update` behaviour when a version is included in the dtab file

We check the version of the dtab on namerctl dtab update if we send the dtab in json format (and do a versioned update), but we don't if the dtab is sent via yaml, where the version is included in a comment (i.e. we do a versionless update).

If you just have a json file without setting the version key, (or a yaml file with or without the version included as a comment) then both json and yaml behave the same, i.e. will do versionless updated unless a version is provided using the --version flag.

This is confusing for users (#21). We should standardize. i.e. when a version is included in json or yaml, we should use it in both cases.

Example

When you do a namerctl dtab get <dtab namespace>, namerctl prints the dtab string with the version as a yaml comment. The user can then make updates to the dtab they received and run a namerctl dtab update <dtab namespace> and the update will work:

$ namerctl dtab get default
# version AAAAAAAAAAQ=
/svc  => /#/io.l5d.fs ;

$ namerctl dtab get default > default.yaml

# update default.yaml without changing the version
$ namerctl dtab update default default.yaml
Updated default

# update default.yaml *again* without changing the version
$ namerctl dtab update default default.yaml
Updated default

However, if you do the same steps, but add --json, you'll get a unexpected response: 412 Precondition Failed because we do check the version if it's included in the json payload:

$ namerctl dtab get default --json
{"version":"AAAAAAAAAAg=","dtab":[{"prefix":"/svc","dst":"/#/io.l5d.fs"}]}

$ namerctl dtab get default --json > default.json

# update default.json without changing the version
$ namerctl dtab update default default.json
Updated default

# update default.json *again* without changing the version
$ namerctl dtab update default default.json
Error: unexpected response: 412 Precondition Failed

Haven't error when use wrong port

By mistake I've used admin port (9991) instead of http (4181).
And run command: namerctl dtab create incoming incoming --base-url "http://host:9991"
After that I got message: Created incoming and didn't have an error

When I run: namerctl dtab ls --base-url "http://host:9991"
I got: Error: invalid character '<' looking for beginning of value

namerctl 0.8.6 dtab update behavior differs when updating using json vs yaml format

Intro

  1. when you update a dtab it gets assigned with a new version value.
  2. namerctl doesn't check the version value included in a yaml dtab file, while it does provided it is json format.
  3. when you update a dtab using a mismatched version (json), the error received client side is not that clear

Prerequisites

  1. linkerd + namerd + namerctl
  2. create some dtab named internal

Repro steps

  1. download a dtab in yaml format: namerctl dtab get internal > internal.yaml
  2. update the dtab using the yaml downloaded in step 1: namerctl dtab update internal internal.yaml
  3. update the dtab twice: namerctl dtab update internal internal.yaml
    Note: please note that you should have been able update it successfully
  4. download a dtab in json format: namerctl dtab get internal --json > internal.json
  5. update the dtab using the json downloaded in step 4: namerctl dtab update internal internal.json
  6. update the dtab twice: namerctl dtab update internal internal.json

Expected

It could either work like in step 3 for yaml format or at least both could behave in the very same way

Actual

Error: unexpected response: 412 Precondition Failed

Workaround

  1. download the json file again so you get the updated version value.
  2. as @rmars mentioned, you could just remove the version value from your json and it should behave similarly to yaml case.

Warning

I couldn't realize when/why. But at some point you might need to restart namerd to get the latest version. It looks like it get cached or similar.

Support configuration files

the viper library, a sibling of cobra, supports loading configuration from a file. this would be extremely useful for loading base-url. We should support at least configuration in $PWD and $HOME. We may also want to support searching in all parent directories until we find a .namerdctl file, but we don't have to do that initially.

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.