Customize the default setup
Learn how to customize the default gateway proxy settings.
About customizing the gateway
The configuration that is used to spin up a gateway proxy is stored in several custom resources, including GatewayParameters, Settings, and a gateway proxy template. By default, Gloo Gateway creates these resources for you during the installation so that you can spin up gateway proxies with the default proxy configuration. You have the following options to change the default configuration for your gateway proxies:
Option | Description |
---|---|
Create your own GatewayParameters resource (recommended) | To adjust the settings on the gateway proxy, you can create your own GatewayParameters resource. This approach allows you to spin up gateway proxies with different configurations. Keep in mind that you must maintain the GatewayParameters resources that you created manually. The values in these resources are not automatically updated during upgrades. |
Change default GatewayParameters and Settings | You can change the values for the default GatewayParameters and Settings resources by updating the values in the Gloo Gateway Helm chart. Do not update the values in these resources directly as the values do not persist between upgrades. The values that you set in your Helm chart are automatically applied to the default GatewayParameters and Settings resources, and rolled out to the gateway proxies. |
Create self-managed gateways with custom proxy templates | If you want to change the default gateway proxy template and provide your own Envoy configuration to bootstrap the proxy with, you must create a self-managed gateway. |
Customize the gateway proxy
The example in this guide uses the GatewayParameters resource to change settings on the gateway proxy. To find other customization examples, see the Deployment patterns guides.
Optional: Review the default configuration for your gateway proxies. This configuration can help you identify the settings that you want to change or add.
Create a GatewayParameters resource to add any custom settings to the gateway. The following example makes the following changes:
- The Kubernetes service type is changed to NodePort (default value:
LoadBalancer
). - The
gateway: custom
label is added to the gateway proxy service that exposes the proxy (default value:gloo=kube-gateway
). - The
gateway: custom
label is added to the gateway proxy pod (default value:gloo=kube-gateway
). - The security context of the gateway proxy is changed to use the 50000 as the supplemental group ID and user ID (default values:
10101
).
For other settings, see the GatewayParameters proto file or check out the Deployment pattern guides.- The Kubernetes service type is changed to NodePort (default value:
Create a Gateway resource that references your custom GatewayParameters by using the
gateway.gloo.solo.io/gateway-parameters-name
annotation.Verify that a pod is created for your gateway proxy and that it has the pod settings that you defined in the GatewayParameters resource.
If the pod does not come up, try runningkubectl get events -n gloo-system
to see if the Kubernetes API server logged any failures. If no events are logged, ensure that thegloo-gateway
GatewayClass is present in your cluster and that the Gateway resource shows anAccepted
status.Example output:
Get the details of the service that exposes the gateway proxy. Verify that the service is of type NodePort and that the extra label was added to the service.
Example output: