GithubHelp home page GithubHelp logo

planetlabs / hal5d Goto Github PK

View Code? Open in Web Editor NEW
7.0 5.0 0.0 8.36 MB

An haproxy shim for linkerd Kubernetes ingress

License: Apache License 2.0

Go 98.98% Shell 0.63% Dockerfile 0.39%
kubernetes ingress haproxy linkerd tls sni

hal5d's People

Contributors

eshagh avatar jacobstr avatar negz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

hal5d's Issues

hal5d crash can result in stale certificates

https://github.com/negz/hal5d/blob/937aa88/internal/cert/manager.go#L449

Currently hal5d validates new certificates by:

  1. Writing them out as a temporary file in the real, production haproxy certificate dir
  2. Running haproxy -c against the real, production haproxy config
  3. Either 'committing' (by renaming the cert and reloading haproxy) or 'rolling back' (by deleting the cert) the new cert.

If hal5d crashes or is shutdown anywhere between steps 1 and 3 it will forget all about the temporary certificate file it wrote out. If the certificate was bad then all future certificates will fail validation and not be loaded, because haproxy -c validates all certificates in the directory as a whole, not just the new incoming ones. Further more, if haproxy were to restart for some reason it would be unable to start due to the invalid certificate.

hal5d should write temporary certificate files to an alternative 'staging' directory and validate against that rather than the production directory. The staging directory should either be cleaned before each validation run, or unique (i.e. a temporary directory) to each run.

hal5d does not correctly identify unchanged TLS certificates

https://github.com/negz/hal5d/blob/937aa88/internal/cert/manager.go#L409

When Kubernetes notifies hal5d about an ingress certificate hal5d should avoid writing the new certificate (and reloading) if the certificate matches one already on the disk. In practice this does not seem to be working; our stats show the same certificates being rewritten and haproxy reloaded every 30 minutes (i.e. the Kubernetes watch refresh interval) despite these certificates being unchanged.

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.