Skip to content

Instantly share code, notes, and snippets.

View nathancoleman's full-sized avatar

Nathan Coleman nathancoleman

View GitHub Profile
@nathancoleman
nathancoleman / README.md
Last active October 20, 2022 20:00
Configuring the LoadBalancer created by the Consul API Gateway controller

Configuring the load balancer created by the Consul API Gateway controller

Unless configured otherwise, the Consul API Gateway controller creates a load balancer for each Gateway resource. Since we're in Kubernetes, we do this by spinning up a Service resource with type: LoadBalancer.

Each of the major cloud providers allow you to configure the resulting load balancer by specifying one or more annotations on the Kubernetes Service object. You may not add these annotations directly to the Service as the controller is creating it on your behalf; however, the Consul API Gateway controller will copy specific annotations from the Gateway object - which you do control - to the Service object that it creates. To do so, you must specify the list of keys for annotations that you would like copied in values.yaml here. You must then add those annotations to the Gateway. The A

@nathancoleman
nathancoleman / stack.yaml
Created March 8, 2022 20:06
Reproduce namespace selector issue for Consul API Gateway
apiVersion: v1
kind: Namespace
metadata:
name: other-namespace
labels:
other: 'true'
---
apiVersion: v1
automountServiceAccountToken: true
kind: ServiceAccount

Keybase proof

I hereby claim:

  • I am nathancoleman on github.
  • I am ncmn (https://keybase.io/ncmn) on keybase.
  • I have a public key ASDP4dC3-QABBVOBvGqA-y4iKSYpyj3PVi5TMEAdSAF1Ewo

To claim this, I am signing this object: