Deploying Failure Flags on Azure Container Apps
Supported platforms:
This guide explains how to deploy the Failure Flags sidecar alongside an application on Azure Container Apps. Each replica runs your application container and the gremlin/failure-flags-sidecar container together.
The configuration below uses Failure Flags by proxy. Inbound requests enter through the sidecar before reaching your application. Outbound HTTP and HTTPS requests pass through the sidecar's dependency proxy, allowing Gremlin to inject faults into calls to downstream services.
Before you begin, you need Azure CLI, access to an Azure subscription, a resource group and Container Apps environment, and your Gremlin team credentials. If you need to create the Azure resources, follow the Azure Container Apps quickstart.
Configuring Failure Flags for Azure Container Apps
Configure the sidecar with the common Failure Flags settings and the proxy settings below. Put sidecar settings on the Gremlin container and application proxy settings on your application container.
Common and credential options (sidecar container)
Ingress proxy options (sidecar container)
The ingress proxy handles requests arriving at your application. Configure Azure ingress to send traffic to the proxy's listening port.
Dependency proxy options (sidecar container)
The dependency proxy handles outbound requests from your application to other HTTP or HTTPS services.
Application container options
Configure your application's HTTP client to send outbound requests through the dependency proxy. The example includes both uppercase and lowercase environment variable names for clients that recognize different forms.
Sidecar tuning options
Size the application and sidecar together. The example allocates 0.5 CPU and 1Gi to the application, plus 0.25 CPU and 0.5Gi to the sidecar. The combined 0.75 CPU and 1.5Gi allocation is supported by the Consumption plan. See Azure's resource requirements before changing these values.
The example keeps one replica running. Adjust its resource and scaling settings for your workload.
Adding the sidecar to your Azure Container App
Add the Gremlin sidecar to the properties.template.containers list alongside your application. Containers in the same replica share networking, so both proxies can reach the application over localhost.
Prepare your deployment values
Replace every <PLACEHOLDER> in the commands and YAML with your own value, including the angle brackets. Keep the surrounding quotes.
Sign in to Azure, select your subscription, and install or update the Container Apps CLI extension:
Get the environment resource ID to use in the YAML. If your environment belongs to a different resource group, use that group's name for this lookup.
Define the application and sidecar
Save the following YAML as containerapp.yaml. Replace each PEM placeholder with the complete multiline value, indenting every line beneath value: |.
For an existing app, merge the sidecar and proxy settings into its complete manifest. Preserve its startup command, environment variables, registry access, volumes, probes, and other required configuration. The example uses your image's default startup command.
The example uses these routing settings:
- Inbound traffic: Azure ingress targets port
5035. The sidecar forwards requests tohttp://localhost:<APPLICATION_PORT>. - Outbound traffic: Your application's proxy variables point to
http://localhost:5034. Localhost requests bypass this proxy.
The names gremlin-sidecar, gremlin-team-cert, and gremlin-team-key are local container and secret labels. You can rename them; update the corresponding secretRef values and log commands as well.
Deploy the Container App
Use the same app and resource group values in your YAML and CLI commands. For a new Container App, run:
For an existing Container App, apply your merged manifest with:
Verify the deployment
Check that Azure reports successful provisioning, a ready revision, and ingress port 5035:
Send a request to your application. Replace <APPLICATION_TEST_PATH> with a safe endpoint path, including its leading /, and add authentication if your app requires it.
Confirm the expected response, then trigger an application operation that calls an HTTP or HTTPS dependency. Open Failure Flags, select your team, and find the name supplied as <GREMLIN_SERVICE_NAME>. After traffic passes through the proxies, check for the http-ingress and egress flags and selectors matching your requests.
Troubleshooting Failure Flags
View the sidecar's logs to check startup, registration, and connection errors:
For additional detail, add GREMLIN_DEBUG with the string value "true" to the sidecar's environment variables and deploy the updated manifest. Enable GREMLIN_TRACE when you also need network request diagnostics. Return these settings to their previous values after troubleshooting.
If the sidecar registers but traffic does not appear in Gremlin, check the Azure ingress target, the upstream application port, and your HTTP client's proxy configuration. If registration fails, check the selected team, certificate and private key, secret references, and connectivity to Gremlin. If a revision fails to start, inspect both containers' logs and verify image access, resource allocation, and startup settings.
For more help, see Troubleshooting Failure Flags.

