Skip to content

Commit

Permalink
envoy: Support more envoy image tag formats
Browse files Browse the repository at this point in the history
This commit is to add the support for below image tags

Different envoy image tag formats:

```
quay.io/cilium/cilium-envoy:f195a0a836629ceca5d7561f758c9505d9ebaebfa262647a2d4
quay.io/cilium/cilium-envoy:v1.23-f195a0a836629ceca5d7561f758c9505d9ebaebfa262647a2d4
```

Testing was done as per below, kindly note the existing format should be
working as usual.

```bash
$ test=quay.io/cilium/cilium-envoy:014ceeb312a4d18dcf0ea219143f099fa91f2f28@sha256:1a3020822e8fb10b5f96bf45554690c411c2f48d8ca8fcf33da871dad1ce6b53
$ echo $test | sed -E -e 's/[^/]*\/[^:]*:([^:@]*).*/\1/p;d' | sed -E -e 's/.*-([^-]*)$/\1/'
014ceeb312a4d18dcf0ea219143f099fa91f2f28
$ test=quay.io/cilium/cilium-envoy:v1.24-014ceeb312a4d18dcf0ea219143f099fa91f2f28@sha256:1a3020822e8fb10b5f96bf45554690c411c2f48d8ca8fcf33da871dad1ce6b53
$ echo $test | sed -E -e 's/[^/]*\/[^:]*:([^:@]*).*/\1/p;d' | sed -E -e 's/.*-([^-]*)$/\1/'
014ceeb312a4d18dcf0ea219143f099fa91f2f28
```

Fixes: #24749

Signed-off-by: Tam Mach <tam.mach@cilium.io>
  • Loading branch information
sayboras committed Apr 5, 2023
1 parent e0f7fac commit afcda94
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile.defs
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ endif

ifneq ($(wildcard $(dir $(lastword $(MAKEFILE_LIST)))/images/cilium/Dockerfile),)
CILIUM_ENVOY_REF=$(shell sed -E -e 's/^FROM (--[^ ]* )*([^ ]*) as cilium-envoy/\2/p;d' < $(ROOT_DIR)/images/cilium/Dockerfile)
CILIUM_ENVOY_SHA=$(shell echo $(CILIUM_ENVOY_REF) | sed -E -e 's/[^/]*\/[^:]*:([^:@-]*).*/\1/p;d')
CILIUM_ENVOY_SHA=$(shell echo $(CILIUM_ENVOY_REF) | sed -E -e 's/[^/]*\/[^:]*:([^:@]*).*/\1/p;d' | sed -E -e 's/.*-([^-]*)$/\1/')
GO_BUILD_LDFLAGS += -X "github.com/cilium/cilium/pkg/envoy.RequiredEnvoyVersionSHA=$(CILIUM_ENVOY_SHA)"
endif

Expand Down

0 comments on commit afcda94

Please sign in to comment.