Skip to content

Commit

Permalink
Adopt to new gardener registry
Browse files Browse the repository at this point in the history
  • Loading branch information
majst01 committed Jan 19, 2024
1 parent 14e0b08 commit d85613f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/webhook/shoot/mutator.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,10 @@ func (m *mutator) mutateVPNShootDeployment(_ context.Context, deployment *appsv1
const (
gardenerRegistry = "eu.gcr.io"
hyperkubeImage = "/gardener-project/hyperkube"

// this should be the final destination
newGardenerRegistry = "europe-docker.pkg.dev/gardener-project/releases/hyperkube"
newHyperkubeImage = "/gardener-project/releases/hyperkube"
)

func (m *mutator) mutateCloudConfigDownloaderHyperkubeImage(ctx context.Context, secret *corev1.Secret) error {
Expand Down Expand Up @@ -195,6 +199,7 @@ func (m *mutator) mutateCloudConfigDownloaderHyperkubeImage(ctx context.Context,
if ok {
script := string(raw)
newScript := strings.ReplaceAll(script, gardenerRegistry+hyperkubeImage, destinationRegistry+hyperkubeImage)
newScript = strings.ReplaceAll(newScript, newGardenerRegistry+newHyperkubeImage, destinationRegistry+hyperkubeImage)
secret.Data[downloader.DataKeyScript] = []byte(newScript)
secret.Annotations[downloader.AnnotationKeyChecksum] = utils.ComputeChecksum(newScript)
}
Expand Down

0 comments on commit d85613f

Please sign in to comment.