Ingress API key

Let’s say you just wanted to have a simple API-key for your nginx ingress. The if structures in nginx configs are an interesting way to do this. There might be more effecient ways to do this, but for now this will do. Example example-ingress.yaml: apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: some-ingress annotations: nginx.ingress.kubernetes.io/use-regex: "true" nginx.ingress.kubernetes.io/configuration-snippet: | if ($arg_api_key != 'yourVerySecretKey') { return 401 'Access denied!'; } if ($http_x_api_key != 'yourVerySecretKey') { return 401 'Access denied!'; } spec: ingressClassName: nginx tls: - hosts: - koudijs.dev secretName: tls-koudijs-dev rules: - host: koudijs.dev http: paths: - path: / pathType: Prefix backend: service: name: some-backend-service port: number: 80 Running it can off course be done by: ...

1 min · Simon Koudijs

Azure functions auth in k8s

On this docker hub page you can find all functions containers. This will allow you to run your Azure Functions inside kubernetes. But how do you set this up? What things are not included? Functions in Azure itself Azure functions make it very easy to run your pieces of code in Azure. As I currently see it: Microsoft divided ‘core’ functions from hosting functions. The GUI inside Azure allows you to: ...

1 min · Simon Koudijs

Why I build my slides in code

I don’t use PowerPoint. Not because I think it’s bad, but because I kept feeling like I was fighting the tool rather than thinking about what I wanted to say. Git is the closest thing I have to a personal philosophy. Everything is a file. History is preserved. Anyone can look. I use it for code, for infrastructure, for documentation. It felt odd to then go build a presentation in a binary format that nobody can diff, review, or fork. ...

3 min · Simon Koudijs