Merge pull request #2882 from Zhuzhenghao/registry.k8s.io

Move to registry.k8s.io
This commit is contained in:
karmada-bot 2022-12-01 15:08:03 +08:00 committed by GitHub
commit 2224d1e700
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 29 additions and 29 deletions

View File

@ -15425,7 +15425,7 @@
],
"properties": {
"component": {
"description": "Component is part of image name. Basically we presume an image can be made of '[registry/]repository[:tag]'. The registry could be: - k8s.gcr.io - fictional.registry.example:10443 The repository could be: - kube-apiserver - fictional/nginx The tag cloud be: - latest - v1.19.1 - @sha256:dbcc1c35ac38df41fd2f5e4130b32ffdb93ebae8b3dbe638c23575912276fc9c",
"description": "Component is part of image name. Basically we presume an image can be made of '[registry/]repository[:tag]'. The registry could be: - registry.k8s.io - fictional.registry.example:10443 The repository could be: - kube-apiserver - fictional/nginx The tag cloud be: - latest - v1.19.1 - @sha256:dbcc1c35ac38df41fd2f5e4130b32ffdb93ebae8b3dbe638c23575912276fc9c",
"type": "string",
"default": ""
},

View File

@ -64,7 +64,7 @@ spec:
- --tls-cert-file=/etc/karmada/pki/apiserver.crt
- --tls-private-key-file=/etc/karmada/pki/apiserver.key
name: karmada-apiserver
image: k8s.gcr.io/kube-apiserver:v1.25.2
image: registry.k8s.io/kube-apiserver:v1.25.2
imagePullPolicy: IfNotPresent
livenessProbe:
failureThreshold: 8

View File

@ -33,7 +33,7 @@ spec:
- operator: Exists
containers:
- name: etcd
image: k8s.gcr.io/etcd:3.5.3-0
image: registry.k8s.io/etcd:3.5.3-0
imagePullPolicy: IfNotPresent
livenessProbe:
exec:

View File

@ -52,7 +52,7 @@ spec:
- --service-cluster-ip-range=10.96.0.0/12
- --use-service-account-credentials=true
- --v=4
image: k8s.gcr.io/kube-controller-manager:v1.25.2
image: registry.k8s.io/kube-controller-manager:v1.25.2
imagePullPolicy: IfNotPresent
livenessProbe:
failureThreshold: 8

View File

@ -208,7 +208,7 @@ helm install karmada-scheduler-estimator -n karmada-system ./charts/karmada
| `etcd.external.certs.crt` | CRT of the etcd certificate | `""` |
| `etcd.external.certs.key` | KEY of the etcd certificate | `""` |
| `etcd.internal.replicaCount` | Target replicas of the etcd | `1` |
| `etcd.internal.image.repository` | Image of the etcd | `"k8s.gcr.io/etcd"` |
| `etcd.internal.image.repository` | Image of the etcd | `"registry.k8s.io/etcd"` |
| `etcd.internal.image.pullPolicy` | Image pull policy of the etcd | `"IfNotPresent"` |
| `etcd.internal.image.tag` | Image tag of the etcd | `"3.5.3-0"` |
| `etcd.internal.storageType` | StorageType of the etcd, accepts "hostPath", "pvc" | `"hostPath"` |
@ -279,7 +279,7 @@ helm install karmada-scheduler-estimator -n karmada-system ./charts/karmada
| `apiServer.podLabels` | Labels of the karmada-apiserver pods | `{}` |
| `apiServer.podAnnotations` | Annotations of the karmada-apiserver pods | `{}` |
| `apiServer.imagePullSecrets` | Image pull secret of the karmada-apiserver | `[]` |
| `apiServer.image.repository` | Image of the karmada-apiserver | `"k8s.gcr.io/kube-apiserver"` |
| `apiServer.image.repository` | Image of the karmada-apiserver | `"registry.k8s.io/kube-apiserver"` |
| `apiServer.image.tag` | Image tag of the karmada-apiserver | `"v1.25.2"` |
| `apiServer.image.pullPolicy` | Image pull policy of the karmada-apiserver | `"IfNotPresent"` |
| `apiServer.resources` | Resource quota of the karmada-apiserver | `{}` |
@ -308,7 +308,7 @@ helm install karmada-scheduler-estimator -n karmada-system ./charts/karmada
| `kubeControllerManager.podLabels` | Labels of the kube-controller-manager pods | `{}` |
| `kubeControllerManager.podAnnotations` | Annotations of the kube-controller-manager pods | `{}` |
| `kubeControllerManager.imagePullSecrets` | Image pull secret of the kube-controller-manager | `[]` |
| `kubeControllerManager.image.repository` | Image of the kube-controller-manager | `"k8s.gcr.io/kube-controller-manager"` |
| `kubeControllerManager.image.repository` | Image of the kube-controller-manager | `"registry.k8s.io/kube-controller-manager"` |
| `kubeControllerManager.image.tag` | Image tag of the kube-controller-manager | `"v1.25.2"` |
| `kubeControllerManager.image.pullPolicy` | Image pull policy of the kube-controller-manager | `"IfNotPresent"` |
| `kubeControllerManager.resources` | Resource quota of the kube-controller-manager | `{}` |

View File

@ -154,7 +154,7 @@ spec:
component:
description: 'Component is part of image name. Basically
we presume an image can be made of ''[registry/]repository[:tag]''.
The registry could be: - k8s.gcr.io - fictional.registry.example:10443
The registry could be: - registry.k8s.io - fictional.registry.example:10443
The repository could be: - kube-apiserver - fictional/nginx
The tag cloud be: - latest - v1.19.1 - @sha256:dbcc1c35ac38df41fd2f5e4130b32ffdb93ebae8b3dbe638c23575912276fc9c'
enum:
@ -476,7 +476,7 @@ spec:
component:
description: 'Component is part of image name. Basically
we presume an image can be made of ''[registry/]repository[:tag]''.
The registry could be: - k8s.gcr.io - fictional.registry.example:10443
The registry could be: - registry.k8s.io - fictional.registry.example:10443
The repository could be: - kube-apiserver - fictional/nginx
The tag cloud be: - latest - v1.19.1 - @sha256:dbcc1c35ac38df41fd2f5e4130b32ffdb93ebae8b3dbe638c23575912276fc9c'
enum:

View File

@ -154,7 +154,7 @@ spec:
component:
description: 'Component is part of image name. Basically
we presume an image can be made of ''[registry/]repository[:tag]''.
The registry could be: - k8s.gcr.io - fictional.registry.example:10443
The registry could be: - registry.k8s.io - fictional.registry.example:10443
The repository could be: - kube-apiserver - fictional/nginx
The tag cloud be: - latest - v1.19.1 - @sha256:dbcc1c35ac38df41fd2f5e4130b32ffdb93ebae8b3dbe638c23575912276fc9c'
enum:
@ -476,7 +476,7 @@ spec:
component:
description: 'Component is part of image name. Basically
we presume an image can be made of ''[registry/]repository[:tag]''.
The registry could be: - k8s.gcr.io - fictional.registry.example:10443
The registry could be: - registry.k8s.io - fictional.registry.example:10443
The repository could be: - kube-apiserver - fictional/nginx
The tag cloud be: - latest - v1.19.1 - @sha256:dbcc1c35ac38df41fd2f5e4130b32ffdb93ebae8b3dbe638c23575912276fc9c'
enum:

View File

@ -313,7 +313,7 @@ apiServer:
## @param image.pullSecrets Specify docker-registry secret names as an array
##
image:
registry: k8s.gcr.io
registry: registry.k8s.io
repository: kube-apiserver
tag: "v1.25.2"
## Specify a imagePullPolicy
@ -453,7 +453,7 @@ kubeControllerManager:
## @param image.pullSecrets Specify docker-registry secret names as an array
##
image:
registry: k8s.gcr.io
registry: registry.k8s.io
repository: kube-controller-manager
tag: "v1.25.2"
## Specify a imagePullPolicy
@ -529,7 +529,7 @@ etcd:
## @param image.pullPolicy etcd image pull policy
##
image:
registry: k8s.gcr.io
registry: registry.k8s.io
repository: etcd
tag: "3.5.3-0"
## Specify a imagePullPolicy

View File

@ -671,14 +671,14 @@ function util:host_platform() {
function util::set_mirror_registry_for_china_mainland() {
local repo_root=${1}
export GOPROXY=https://goproxy.cn,direct # set domestic go proxy
# set mirror registry of k8s.gcr.io
registry_files=( # Yaml files that contain image host 'k8s.gcr.io' need to be replaced
# set mirror registry of registry.k8s.io
registry_files=( # Yaml files that contain image host 'registry.k8s.io' need to be replaced
"artifacts/deploy/karmada-etcd.yaml"
"artifacts/deploy/karmada-apiserver.yaml"
"artifacts/deploy/kube-controller-manager.yaml"
)
for registry_file in "${registry_files[@]}"; do
sed -i'' -e "s#k8s.gcr.io#registry.aliyuncs.com/google_containers#g" ${repo_root}/${registry_file}
sed -i'' -e "s#registry.k8s.io#registry.aliyuncs.com/google_containers#g" ${repo_root}/${registry_file}
done
# set mirror registry in the dockerfile of components of karmada

View File

@ -148,7 +148,7 @@ type ImageOverrider struct {
// Component is part of image name.
// Basically we presume an image can be made of '[registry/]repository[:tag]'.
// The registry could be:
// - k8s.gcr.io
// - registry.k8s.io
// - fictional.registry.example:10443
// The repository could be:
// - kube-apiserver

View File

@ -2760,7 +2760,7 @@ func schema_pkg_apis_policy_v1alpha1_ImageOverrider(ref common.ReferenceCallback
},
"component": {
SchemaProps: spec.SchemaProps{
Description: "Component is part of image name. Basically we presume an image can be made of '[registry/]repository[:tag]'. The registry could be: - k8s.gcr.io - fictional.registry.example:10443 The repository could be: - kube-apiserver - fictional/nginx The tag cloud be: - latest - v1.19.1 - @sha256:dbcc1c35ac38df41fd2f5e4130b32ffdb93ebae8b3dbe638c23575912276fc9c",
Description: "Component is part of image name. Basically we presume an image can be made of '[registry/]repository[:tag]'. The registry could be: - registry.k8s.io - fictional.registry.example:10443 The repository could be: - kube-apiserver - fictional/nginx The tag cloud be: - latest - v1.19.1 - @sha256:dbcc1c35ac38df41fd2f5e4130b32ffdb93ebae8b3dbe638c23575912276fc9c",
Default: "",
Type: []string{"string"},
Format: "",

View File

@ -30,7 +30,7 @@ import (
var (
imageRepositories = map[string]string{
"global": "k8s.gcr.io",
"global": "registry.k8s.io",
"cn": "registry.cn-hangzhou.aliyuncs.com/google_containers",
}

View File

@ -13,7 +13,7 @@ import (
// fictional.registry.example:10443/karmada/karmada-controller-manager:v1.0.0 or
// fictional.registry.example:10443/karmada/karmada-controller-manager@sha256:50d858e0985ecc7f60418aaf0cc5ab587f42c2570a884095a9e8ccacd0f6545c
type Components struct {
// hostname is the prefix of referencing image, like "k8s.gcr.io".
// hostname is the prefix of referencing image, like "registry.k8s.io".
// It may optionally be followed by a port number, like "fictional.registry.example:10443".
hostname string
// repository is the short name of referencing image, like "karmada-controller-manager".
@ -162,7 +162,7 @@ func Parse(image string) (*Components, error) {
return comp, nil
}
// SplitHostname splits a repository name(ie: k8s.gcr.io/kube-apiserver) to hostname(k8s.gcr.io) and remotename(kube-apiserver) string.
// SplitHostname splits a repository name(ie: registry.k8s.io/kube-apiserver) to hostname(registry.k8s.io) and remotename(kube-apiserver) string.
func SplitHostname(name string) (hostname, remoteName string) {
i := strings.IndexRune(name, '/')
if i == -1 || (!strings.ContainsAny(name[:i], ".:") && name[:i] != "localhost") {

View File

@ -183,7 +183,7 @@ func generateDeploymentYamlWithTwoContainer() *unstructured.Unstructured {
"name": "nginx",
},
map[string]interface{}{
"image": "k8s.gcr.io/nginx-slim:0.8",
"image": "registry.k8s.io/nginx-slim:0.8",
"name": "nginx",
}}}}}}}
}
@ -225,14 +225,14 @@ func TestParseJSONPatchesByImageOverrider(t *testing.T) {
imageOverrider: &policyv1alpha1.ImageOverrider{
Component: "Registry",
Operator: "add",
Value: "k8s.gcr.io",
Value: "registry.k8s.io",
},
},
want: []overrideOption{
{
Op: "replace",
Path: "/spec/template/spec/containers/0/image",
Value: "k8s.gcr.io/perl:5.34.0",
Value: "registry.k8s.io/perl:5.34.0",
},
},
wantErr: false,
@ -247,14 +247,14 @@ func TestParseJSONPatchesByImageOverrider(t *testing.T) {
},
Component: "Registry",
Operator: "add",
Value: "k8s.gcr.io",
Value: "registry.k8s.io",
},
},
want: []overrideOption{
{
Op: "replace",
Path: "/spec/template/spec/containers/0/image",
Value: "k8s.gcr.io/perl:5.34.0",
Value: "registry.k8s.io/perl:5.34.0",
},
},
wantErr: false,
@ -525,7 +525,7 @@ func TestParseJSONPatchesByImageOverrider(t *testing.T) {
{
Op: "replace",
Path: "/spec/template/spec/containers/1/image",
Value: "k8s.gcr.io/nginx:0.8",
Value: "registry.k8s.io/nginx:0.8",
},
},
wantErr: false,
@ -569,7 +569,7 @@ func TestParseJSONPatchesByImageOverrider(t *testing.T) {
{
Op: "replace",
Path: "/spec/template/spec/containers/1/image",
Value: "k8s.gcr.io/nginx:0.8",
Value: "registry.k8s.io/nginx:0.8",
},
},
wantErr: false,