Skip to content

switch redis-exporter docker image #20504

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jan 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading