Skip to content

Commit

Permalink
switch redis-exporter docker image (#20504)
Browse files Browse the repository at this point in the history
* switch redis-exporter docker image

* add comments

* using old version for test update

* update index (#20506)

Co-authored-by: iQQBot <[email protected]>

---------

Co-authored-by: Robo Quat <[email protected]>
Co-authored-by: iQQBot <[email protected]>
  • Loading branch information
3 people authored Jan 7, 2025
1 parent 804521f commit a5847d2
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 11 deletions.
15 changes: 8 additions & 7 deletions .github/workflows/update-image-digest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,14 @@ jobs:
done < <(find "$(pwd)" -type f \( -name "*.yaml" -o -name "*.yml" -o -name "Dockerfile*" -o -name "leeway.Dockerfile" \) -print0)
# update for chainguard redis
# redisImageDigest=$(crane digest cgr.dev/chainguard/redis:latest)
# redisExporterDigest=$(crane digest cgr.dev/chainguard/prometheus-redis-exporter:latest)
# sed -i -e "s/^\(\s*ImageDigest\s*=\s*\)\".*\"/\1\"$redisImageDigest\"/" install/installer/pkg/components/redis/constants.go
# sed -i -e "s/^\(\s*ExporterImageDigest\s*=\s*\)\".*\"/\1\"$redisExporterDigest\"/" install/installer/pkg/components/redis/constants.go
# go fmt install/installer/pkg/components/redis/constants.go
redisImageDigest=$(crane digest cgr.dev/chainguard/redis:latest)
# we switch to the quay.io image for the redis exporter, because cgr.dev/chainguard/prometheus-redis-exporter is not public anymore.
# see detail in https://linear.app/gitpod/issue/CLC-1039/#comment-c90cb270
redisExporterDigest=$(crane digest quay.io/oliver006/redis_exporter:latest)
sed -i -e "s/^\(\s*ImageDigest\s*=\s*\)\".*\"/\1\"$redisImageDigest\"/" install/installer/pkg/components/redis/constants.go
sed -i -e "s/^\(\s*ExporterImageDigest\s*=\s*\)\".*\"/\1\"$redisExporterDigest\"/" install/installer/pkg/components/redis/constants.go
go fmt install/installer/pkg/components/redis/constants.go
- name: Check workspace
id: create_pr
shell: bash
Expand Down
7 changes: 4 additions & 3 deletions install/installer/pkg/components/redis/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@ const (
RegistryImage = "chainguard/redis"

ContainerName = "redis"
ImageDigest = "sha256:85ac79734b47c59fe5fc9ca923c321991b792ef9cf759f7f5b7cddffb3eda6db"
ImageDigest = "sha256:2ca5da94e19341085fda0c4bf610689ba1f0bea4e009cb9dad605a1c6195e5d3"

ExporterRegistryImage = "chainguard/prometheus-redis-exporter"
ExporterImageDigest = "sha256:d3ddb25bf7bec9bb898aa4712413182e2699bef5ad7a6cf1dfcd02bc84cf8951"
ExporterRegistryRepo = "quay.io"
ExporterRegistryImage = "oliver006/redis_exporter"
ExporterImageDigest = "sha256:120f7ec77293459ccfdad66bb1db75ab72e8bfeab99f58b1cc2564cadcd7a9e7"

ExporterContainerName = "exporter"
ExporterPortName = "exporter"
Expand Down
2 changes: 1 addition & 1 deletion install/installer/pkg/components/redis/deployment.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ func deployment(ctx *common.RenderContext) ([]runtime.Object, error) {
},
{
Name: ExporterContainerName,
Image: ctx.ImageDigest(common.ThirdPartyContainerRepo(ctx.Config.Repository, RegistryRepo), ExporterRegistryImage, ExporterImageDigest),
Image: ctx.ImageDigest(common.ThirdPartyContainerRepo(ctx.Config.Repository, ExporterRegistryRepo), ExporterRegistryImage, ExporterImageDigest),
ImagePullPolicy: corev1.PullIfNotPresent,
Env: common.CustomizeEnvvar(ctx, Component, common.MergeEnv(
[]v1.EnvVar{
Expand Down

0 comments on commit a5847d2

Please sign in to comment.