Git Product home page Git Product logo

kromgo's Issues

Add internal support for ratelimiting.

When I wrote this 12 hours ago, I planned for most people to use an external source of ratelimiting like NGINX or Cloudflare. Some people are calling it tacky and overcomplicated, so I need to figure out a way to put it in the already condensed app.

I figured out how to middleware it, its just that its difficult to figure out what the real clients ip is for the sake of ratelimiting. You have to trust the proxy thats forwarding to the app to make sure it trusts the X-Forwarded-For or X-Real-Ip or CF-Connecting-IP, plus these IPs have a chance to be non-rfc compliant often having the forwarded ips seperated with commas like: 192.168.1.1,192,168.1.2,etc.

I guess I could set it up so that in the config, you have to specify which header to retrieve the connecting ip with? The http.Request.RemoteAddr in Go has been told to be very very unreliable as per stackoverflow.

debug logging

There's a debug: true you can flag in the config to put more verbose in the replies from prometheus, but other than that its a design flaw in my part.

Hard fail when config file not right.

Initial configuration attempt left me with:

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x6eeedf]
goroutine 1 [running]:
main.main()
/go/src/github.com/kashalls/kromgo/main.go:64 +0x27f

I tracked it down to having this defined:

    globalMounts:
      - path: /kromgo/config.yaml
        subPath: config.yaml
        readOnly: true

Yet, mistakenly the configmap.data had a mismatched extension:

configMaps:
  configmap:
    enabled: true
    data:
      config.yml: |
      ...

I assume that left the pod with either a missing config file or a zero-byte, etc.

The ask is for some additional checks on the config file to log something more friendly and not a panic message.

Default endpoint as the default format?

The endpoint format seems to be more often used than the raw endpoint, leading me to believe we should default the format to the shields supported format.

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

dockerfile
Dockerfile
  • golang 1.22.3-alpine
github-actions
.github/workflows/build-schema.yaml
  • actions/checkout v4.1.6@a5ac7e51b41094c92402da3b24376905380afc29
  • actions/setup-go v5
  • stefanzweifel/git-auto-commit-action v5.0.1@8621497c8c39c72f3e2a999a26b4ca1b5058a842
.github/workflows/container-ci.yaml
  • actions/checkout v4@a5ac7e51b41094c92402da3b24376905380afc29
  • docker/metadata-action v5
  • docker/setup-qemu-action v3
  • docker/setup-buildx-action v3.3.0
  • docker/login-action v3.1.0
  • docker/build-push-action v5.3.0
.github/workflows/does-the-container-build.yaml
  • actions/checkout v4@a5ac7e51b41094c92402da3b24376905380afc29
gomod
go.mod
  • go 1.22.1
  • github.com/invopop/jsonschema v0.12.0
  • github.com/prometheus/client_golang v1.19.0
  • github.com/prometheus/common v0.52.2
  • gopkg.in/yaml.v2 v2.4.0

  • Check this box to trigger a request for Renovate to run again on this repository

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.