Skip to content

Commit 91b88ee

Browse files
authored
Merge pull request #7410 from oscr/change-registry
🌱 Change registry from k8s.gcr.io to registry.k8s.io
2 parents 0940e0c + 2818dc7 commit 91b88ee

File tree

13 files changed

+25
-22
lines changed

13 files changed

+25
-22
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ GOLANGCI_LINT := $(abspath $(TOOLS_BIN_DIR)/$(GOLANGCI_LINT_BIN))
171171

172172
# Define Docker related variables. Releases should modify and double check these vars.
173173
REGISTRY ?= gcr.io/$(shell gcloud config get-value project)
174-
PROD_REGISTRY ?= k8s.gcr.io/cluster-api
174+
PROD_REGISTRY ?= registry.k8s.io/cluster-api
175175

176176
STAGING_REGISTRY ?= gcr.io/k8s-staging-cluster-api
177177
STAGING_BUCKET ?= artifacts.k8s-staging-cluster-api.appspot.com

cmd/clusterctl/client/init_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ func Test_clusterctlClient_InitImages(t *testing.T) {
8181
kubeconfigContext: "mgmt-context",
8282
},
8383
expectedImages: []string{
84-
"k8s.gcr.io/cluster-api-aws/cluster-api-aws-controller:v0.5.3",
84+
"registry.k8s.io/cluster-api-aws/cluster-api-aws-controller:v0.5.3",
8585
},
8686
wantErr: false,
8787
},
@@ -854,7 +854,7 @@ spec:
854854
template:
855855
spec:
856856
containers:
857-
- image: k8s.gcr.io/cluster-api-aws/cluster-api-aws-controller:v0.5.3
857+
- image: registry.k8s.io/cluster-api-aws/cluster-api-aws-controller:v0.5.3
858858
name: manager
859859
volumeMounts:
860860
- mountPath: /home/.aws

controlplane/kubeadm/api/v1beta1/kubeadm_control_plane_webhook_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ func TestKubeadmControlPlaneValidateUpdate(t *testing.T) {
298298
ClusterName: "test",
299299
DNS: bootstrapv1.DNS{
300300
ImageMeta: bootstrapv1.ImageMeta{
301-
ImageRepository: "k8s.gcr.io/coredns",
301+
ImageRepository: "registry.k8s.io/coredns",
302302
ImageTag: "1.6.5",
303303
},
304304
},

controlplane/kubeadm/internal/controllers/controller_test.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1039,7 +1039,7 @@ func TestReconcileInitializeControlPlane(t *testing.T) {
10391039
"ClusterConfiguration": `apiServer:
10401040
dns:
10411041
type: CoreDNS
1042-
imageRepository: k8s.gcr.io
1042+
imageRepository: registry.k8s.io
10431043
kind: ClusterConfiguration
10441044
kubernetesVersion: metav1.16.1`,
10451045
},
@@ -1057,7 +1057,7 @@ kubernetesVersion: metav1.16.1`,
10571057
Spec: corev1.PodSpec{
10581058
Containers: []corev1.Container{{
10591059
Name: "coredns",
1060-
Image: "k8s.gcr.io/coredns:1.6.2",
1060+
Image: "registry.k8s.io/coredns:1.6.2",
10611061
}},
10621062
},
10631063
},
@@ -1163,7 +1163,7 @@ func TestKubeadmControlPlaneReconciler_updateCoreDNS(t *testing.T) {
11631163
ClusterConfiguration: &bootstrapv1.ClusterConfiguration{
11641164
DNS: bootstrapv1.DNS{
11651165
ImageMeta: bootstrapv1.ImageMeta{
1166-
ImageRepository: "k8s.gcr.io",
1166+
ImageRepository: "registry.k8s.io",
11671167
ImageTag: "1.7.2",
11681168
},
11691169
},
@@ -1184,7 +1184,7 @@ func TestKubeadmControlPlaneReconciler_updateCoreDNS(t *testing.T) {
11841184
Spec: corev1.PodSpec{
11851185
Containers: []corev1.Container{{
11861186
Name: "coredns",
1187-
Image: "k8s.gcr.io/coredns:1.6.2",
1187+
Image: "registry.k8s.io/coredns:1.6.2",
11881188
}},
11891189
Volumes: []corev1.Volume{{
11901190
Name: "config-volume",
@@ -1224,7 +1224,7 @@ func TestKubeadmControlPlaneReconciler_updateCoreDNS(t *testing.T) {
12241224
"ClusterConfiguration": `apiServer:
12251225
dns:
12261226
type: CoreDNS
1227-
imageRepository: k8s.gcr.io
1227+
imageRepository: registry.k8s.io
12281228
kind: ClusterConfiguration
12291229
kubernetesVersion: metav1.16.1`,
12301230
},
@@ -1282,7 +1282,7 @@ kubernetesVersion: metav1.16.1`,
12821282
}
12831283
var actualCoreDNSDeployment appsv1.Deployment
12841284
g.Expect(fakeClient.Get(ctx, client.ObjectKey{Name: "coredns", Namespace: metav1.NamespaceSystem}, &actualCoreDNSDeployment)).To(Succeed())
1285-
g.Expect(actualCoreDNSDeployment.Spec.Template.Spec.Containers[0].Image).To(Equal("k8s.gcr.io/coredns:1.7.2"))
1285+
g.Expect(actualCoreDNSDeployment.Spec.Template.Spec.Containers[0].Image).To(Equal("registry.k8s.io/coredns:1.7.2"))
12861286
g.Expect(actualCoreDNSDeployment.Spec.Template.Spec.Volumes).To(ConsistOf(expectedVolume))
12871287
})
12881288

controlplane/kubeadm/internal/webhooks/scale_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ func TestKubeadmControlPlaneValidateScale(t *testing.T) {
8585
ClusterName: "kcp-managed-etcd",
8686
DNS: bootstrapv1.DNS{
8787
ImageMeta: bootstrapv1.ImageMeta{
88-
ImageRepository: "k8s.gcr.io/coredns",
88+
ImageRepository: "registry.k8s.io/coredns",
8989
ImageTag: "1.6.5",
9090
},
9191
},

controlplane/kubeadm/internal/workload_cluster_coredns.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,9 @@ func (w *Workload) getCoreDNSInfo(ctx context.Context, clusterConfig *bootstrapv
231231
return nil, err
232232
}
233233

234-
// Handle the renaming of the upstream image from "k8s.gcr.io/coredns" to "k8s.gcr.io/coredns/coredns"
234+
// Handle the renaming of the upstream image from:
235+
// * "registry.k8s.io/coredns" to "registry.k8s.io/coredns/coredns" or
236+
// * "k8s.gcr.io/coredns" to "k8s.gcr.io/coredns/coredns"
235237
toImageName := parsedImage.Name
236238
if (toImageRepository == oldKubernetesImageRepository || toImageRepository == kubernetesImageRepository) &&
237239
toImageName == oldCoreDNSImageName && targetMajorMinorPatch.GTE(semver.MustParse("1.8.0")) {

docs/book/src/developer/providers/v1.2-to-v1.3.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,3 +64,4 @@ The default value is 0, meaning that the volume can be detached without any time
6464
The variable `SkipUpgrade` could be set to revert to the old behaviour by making use of the `KUBERNETES_VERSION` variable and skipping the kubernetes upgrade.
6565
- cert-manager upgraded from v1.9.1 to v1.10.0.
6666
- Machine `providerID` is now being strictly checked for equality when compared against Kubernetes node `providerID` data. This is the expected criteria for correlating a Cluster API machine to its corresponding Kubernetes node, but historically this comparison was not strict, and instead compared only against the `ID` substring part of the full `providerID` string. Because different providers construct `providerID` strings differently, the `ID` substring is not uniformly defined and implemented across providers, and thus the existing `providerID` equality can not guarantee the correct Machine-Node correlation. It is very unlikely that this new behavior will break existing providers, but FYI: if strict `providerID` equality will degrade expected behaviors, you may need to update your provider implementation prior to adopting Cluster API v1.3.
67+
- Default registry has changed. From now on new images will be published to `registry.k8s.io` instead of `k8s.gcr.io`.

docs/book/src/tasks/experimental-features/cluster-class/operate-cluster.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ Running the patch makes the following change to the Cluster yaml:
199199
topology:
200200
variables:
201201
- name: imageRepository
202-
value: k8s.gcr.io
202+
value: registry.k8s.io
203203
- name: etcdImageTag
204204
value: ""
205205
- name: coreDNSImageTag

docs/book/src/tasks/experimental-features/cluster-class/write-clusterclass.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,8 +206,8 @@ spec:
206206
openAPIV3Schema:
207207
type: string
208208
description: ImageRepository is the container registry to pull images from.
209-
default: k8s.gcr.io
210-
example: k8s.gcr.io
209+
default: registry.k8s.io
210+
example: registry.k8s.io
211211
```
212212

213213
<aside class="note">

docs/developer/releasing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
- `git push origin ${RELEASE_TAG}`
1313
- `git push origin test/${RELEASE_TAG}`
1414

15-
## Promote images from the staging repo to `k8s.gcr.io/cluster-api`
15+
## Promote images from the staging repo to `registry.k8s.io/cluster-api`
1616

1717
Images are built by the [post push images job](https://testgrid.k8s.io/sig-cluster-lifecycle-image-pushes#post-cluster-api-push-images). This will push the image to a [staging repository](https://console.cloud.google.com/gcr/images/k8s-staging-cluster-api).
1818

0 commit comments

Comments
 (0)