From be3911373f552000675bb88728054b90a8813a28 Mon Sep 17 00:00:00 2001 From: Vinayak Kukreja <78971045+vinayak-kukreja@users.noreply.github.com> Date: Tue, 16 May 2023 14:18:26 -0400 Subject: [PATCH] chore: migrate image registry to registry.k8s.io (#1207) Kubernetes has switched to `registry.k8s.io` as their default [image registry](https://github.com/kubernetes/k8s.io/issues/4780). This PR is updating instances of old registry [k8s.gcr.io](http://k8s.gcr.io/) in our codebase. --- test/__snapshots__/yaml.test.ts.snap | 16 ++++++++-------- test/fixtures/guestbook-all-in-one.yaml | 2 +- test/yaml.test.ts | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/test/__snapshots__/yaml.test.ts.snap b/test/__snapshots__/yaml.test.ts.snap index fa9eaa465d..681d29cfc8 100644 --- a/test/__snapshots__/yaml.test.ts.snap +++ b/test/__snapshots__/yaml.test.ts.snap @@ -87,7 +87,7 @@ Array [ "spec": Object { "containers": Array [ Object { - "image": "k8s.gcr.io/redis:e2e", + "image": "registry.k8s.io/redis:e2e", "name": "master", "ports": Array [ Object { @@ -112,10 +112,10 @@ Array [ "metadata": Object { "labels": Object { "app": "redis", - "role": "slave", + "role": "replica", "tier": "backend", }, - "name": "redis-slave", + "name": "redis-replica", }, "spec": Object { "ports": Array [ @@ -125,7 +125,7 @@ Array [ ], "selector": Object { "app": "redis", - "role": "slave", + "role": "replica", "tier": "backend", }, }, @@ -134,14 +134,14 @@ Array [ "apiVersion": "apps/v1", "kind": "Deployment", "metadata": Object { - "name": "redis-slave", + "name": "redis-replica", }, "spec": Object { "replicas": 2, "selector": Object { "matchLabels": Object { "app": "redis", - "role": "slave", + "role": "replica", "tier": "backend", }, }, @@ -149,7 +149,7 @@ Array [ "metadata": Object { "labels": Object { "app": "redis", - "role": "slave", + "role": "replica", "tier": "backend", }, }, @@ -163,7 +163,7 @@ Array [ }, ], "image": "gcr.io/google_samples/gb-redisslave:v1", - "name": "slave", + "name": "replica", "ports": Array [ Object { "containerPort": 6379, diff --git a/test/fixtures/guestbook-all-in-one.yaml b/test/fixtures/guestbook-all-in-one.yaml index e117860214..1135a7d14e 100644 --- a/test/fixtures/guestbook-all-in-one.yaml +++ b/test/fixtures/guestbook-all-in-one.yaml @@ -35,7 +35,7 @@ spec: spec: containers: - name: master - image: k8s.gcr.io/redis:e2e # or just image: redis + image: registry.k8s.io/redis:e2e # or just image: redis resources: requests: cpu: 100m diff --git a/test/yaml.test.ts b/test/yaml.test.ts index ec2e362502..8ed1a83da4 100644 --- a/test/yaml.test.ts +++ b/test/yaml.test.ts @@ -9,7 +9,7 @@ describe('load', () => { }); test('from url', () => { - expect(Yaml.load('https://raw.githubusercontent.com/kubernetes/examples/52158f68ddc508eac9f15a9bb7260b838e644c9f/guestbook/all-in-one/guestbook-all-in-one.yaml')).toMatchSnapshot(); + expect(Yaml.load('https://raw.githubusercontent.com/kubernetes/examples/33dfad21f4f4364c9eb7d48741b954915552ca0a/guestbook/all-in-one/guestbook-all-in-one.yaml')).toMatchSnapshot(); }); test('empty documents are filtered out', () => {