Skip to content

Commit

Permalink
Updating envoy base image (#2002)
Browse files Browse the repository at this point in the history
* Updating envoy base image

Signed-off-by: willdavsmith <[email protected]>

* Updating envoy base image

Signed-off-by: willdavsmith <[email protected]>

* PR

Signed-off-by: willdavsmith <[email protected]>

---------

Signed-off-by: willdavsmith <[email protected]>
  • Loading branch information
willdavsmith authored Jan 28, 2025
1 parent 92142c3 commit 1f80e1f
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 7 deletions.
2 changes: 2 additions & 0 deletions samples/eshop/eshop.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,8 @@ module webshopping 'services/webshopping.bicep' = {
imageRegistry: imageRegistry
imageTag: imageTag
gatewayName: networking.outputs.gateway
envoyImageName: infra.outputs.envoyImageName
envoyImageTag: infra.outputs.envoyImageTag
}
}

Expand Down
6 changes: 6 additions & 0 deletions samples/eshop/infra/infra.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -115,3 +115,9 @@ output servicebus string = servicebus.name
@description('Event Bus connection string')
#disable-next-line outputs-should-not-contain-secrets
output eventBusConnectionString string = (AZURESERVICEBUSENABLED == 'True') ? servicebus.listSecrets().connectionString : rabbitmq.properties.host

@description('Envoy image name')
output envoyImageName string = 'eshop-envoy'

@description('Envoy image tag')
output envoyImageTag string = 'v1.32.3'
8 changes: 7 additions & 1 deletion samples/eshop/services/webshopping.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ param imageTag string
@description('Name of the Gateway')
param gatewayName string

@description('Envoy image name')
param envoyImageName string

@description('Envoy image tag')
param envoyImageTag string

// Based on https://github.com/dotnet-architecture/eShopOnContainers/tree/dev/deploy/k8s/helm/webshoppingagg
resource webshoppingagg 'Applications.Core/containers@2023-10-01-preview' = {
name: 'webshoppingagg'
Expand Down Expand Up @@ -121,7 +127,7 @@ resource webshoppingapigw 'Applications.Core/containers@2023-10-01-preview' = {
properties: {
application: application
container: {
image: '${imageRegistry}/eshop-envoy:0.1.0'
image: '${imageRegistry}/${envoyImageName}:${envoyImageTag}'
ports: {
http: {
containerPort: 80
Expand Down
2 changes: 1 addition & 1 deletion samples/eshop/src/envoy/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
FROM envoyproxy/envoy:v1.11.1
FROM envoyproxy/envoy:v1.32.3
COPY envoy.yaml /etc/envoy/envoy.yaml
CMD ["/usr/local/bin/envoy", "-c", "/etc/envoy/envoy.yaml"]
16 changes: 11 additions & 5 deletions samples/eshop/src/envoy/README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
# Envoy for eshop

## Overview

Eshop uses an internal gateway to route requests between different services. Today in Radius, we don't support private/internal gateways (see https://github.com/radius-project/radius/issues/4789), so we created a custom image of envoy with the routing rules necessary to make eshop work.

What this means is that if we need to update the names of routes in eshop, *we likely need to update the envoy image*.

The routing configuration is in [envoy.yaml](envoy.yaml). See the `route_config` section specifically.

To build the docker image, run `docker build . -t ghcr.io/radius-project/samples/eshop-envoy:0.1.<NUMBER>`.

Where NUMBER is one greater than the latest version made. To view versions, see https://ms.portal.azure.com/#view/Microsoft_Azure_ContainerRegistries/RepositoryBlade/id/%2Fsubscriptions%2F66d1209e-1382-45d3-99bb-650e6bf63fc0%2FresourceGroups%2Fassets%2Fproviders%2FMicrosoft.ContainerRegistry%2Fregistries%2Fradius/repository/eshop-envoy.

To push the image, run `az acr login -n radius` and then `docker push ghcr.io/radius-project/samples/eshop/eshop-envoy:0.1.<NUMBER>`.
## Building

To build and push the image, run the following commands:
> Note: Replace `<TAG>` with the tag you want to use. By convention, we use the same tag as the external eshop image.
```bash
cd samples/eshop/src/envoy
export TAG=<TAG>
docker build . -t ghcr.io/radius-project/samples/eshop/eshop-envoy:$TAG
docker push ghcr.io/radius-project/samples/eshop/eshop-envoy:$TAG
```

0 comments on commit 1f80e1f

Please sign in to comment.