Skip to content

Commit

Permalink
kcp: patch ImageRepository in ClusterConfiguration if it is not set f…
Browse files Browse the repository at this point in the history
…or v1.25
  • Loading branch information
chrischdi committed Jul 15, 2022
1 parent ef7172a commit 35f801c
Show file tree
Hide file tree
Showing 16 changed files with 136 additions and 122 deletions.
5 changes: 3 additions & 2 deletions bootstrap/kubeadm/api/v1alpha4/kubeadm_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,10 @@ type ClusterConfiguration struct {
CertificatesDir string `json:"certificatesDir,omitempty"`

// ImageRepository sets the container registry to pull images from.
// If empty, `k8s.gcr.io` will be used by default; in case of kubernetes version is a CI build (kubernetes version starts with `ci/` or `ci-cross/`)
// If empty, `k8s.gcr.io` or `registry.k8s.io` will be used by default; in case of kubernetes version is a CI build (kubernetes version starts with `ci/` or `ci-cross/`)
// `gcr.io/k8s-staging-ci-images` will be used as a default for control plane components and for kube-proxy, while `k8s.gcr.io`
// will be used for all the other images.
// or `registry.k8s.io` will be used for all the other images.
// It will use `k8s.gcr.io` for Kubernetes <= v1.24, else `registry.k8s.io`.
// +optional
ImageRepository string `json:"imageRepository,omitempty"`

Expand Down
5 changes: 3 additions & 2 deletions bootstrap/kubeadm/api/v1beta1/kubeadm_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,10 @@ type ClusterConfiguration struct {
CertificatesDir string `json:"certificatesDir,omitempty"`

// ImageRepository sets the container registry to pull images from.
// If empty, `k8s.gcr.io` will be used by default; in case of kubernetes version is a CI build (kubernetes version starts with `ci/` or `ci-cross/`)
// If empty, `k8s.gcr.io` or `registry.k8s.io` will be used by default; in case of kubernetes version is a CI build (kubernetes version starts with `ci/` or `ci-cross/`)
// `gcr.io/k8s-staging-ci-images` will be used as a default for control plane components and for kube-proxy, while `k8s.gcr.io`
// will be used for all the other images.
// or `registry.k8s.io` will be used for all the other images.
// It will use `k8s.gcr.io` for Kubernetes <= v1.24, else `registry.k8s.io`.
// +optional
ImageRepository string `json:"imageRepository,omitempty"`

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -266,12 +266,13 @@ spec:
type: object
imageRepository:
description: ImageRepository sets the container registry to pull
images from. If empty, `k8s.gcr.io` will be used by default;
in case of kubernetes version is a CI build (kubernetes version
starts with `ci/` or `ci-cross/`) `gcr.io/k8s-staging-ci-images`
images from. If empty, `k8s.gcr.io` or `registry.k8s.io` will
be used by default; in case of kubernetes version is a CI build
(kubernetes version starts with `ci/` or `ci-cross/`) `gcr.io/k8s-staging-ci-images`
will be used as a default for control plane components and for
kube-proxy, while `k8s.gcr.io` will be used for all the other
images.
kube-proxy, while `k8s.gcr.io` or `registry.k8s.io` will be
used for all the other images. It will use `k8s.gcr.io` for
Kubernetes <= v1.24, else `registry.k8s.io`.
type: string
kind:
description: 'Kind is a string value representing the REST resource
Expand Down Expand Up @@ -1256,12 +1257,13 @@ spec:
type: object
imageRepository:
description: ImageRepository sets the container registry to pull
images from. If empty, `k8s.gcr.io` will be used by default;
in case of kubernetes version is a CI build (kubernetes version
starts with `ci/` or `ci-cross/`) `gcr.io/k8s-staging-ci-images`
images from. If empty, `k8s.gcr.io` or `registry.k8s.io` will
be used by default; in case of kubernetes version is a CI build
(kubernetes version starts with `ci/` or `ci-cross/`) `gcr.io/k8s-staging-ci-images`
will be used as a default for control plane components and for
kube-proxy, while `k8s.gcr.io` will be used for all the other
images.
kube-proxy, while `k8s.gcr.io` or `registry.k8s.io` will be
used for all the other images. It will use `k8s.gcr.io` for
Kubernetes <= v1.24, else `registry.k8s.io`.
type: string
kind:
description: 'Kind is a string value representing the REST resource
Expand Down Expand Up @@ -2244,12 +2246,13 @@ spec:
type: object
imageRepository:
description: ImageRepository sets the container registry to pull
images from. If empty, `k8s.gcr.io` will be used by default;
in case of kubernetes version is a CI build (kubernetes version
starts with `ci/` or `ci-cross/`) `gcr.io/k8s-staging-ci-images`
images from. If empty, `k8s.gcr.io` or `registry.k8s.io` will
be used by default; in case of kubernetes version is a CI build
(kubernetes version starts with `ci/` or `ci-cross/`) `gcr.io/k8s-staging-ci-images`
will be used as a default for control plane components and for
kube-proxy, while `k8s.gcr.io` will be used for all the other
images.
kube-proxy, while `k8s.gcr.io` or `registry.k8s.io` will be
used for all the other images. It will use `k8s.gcr.io` for
Kubernetes <= v1.24, else `registry.k8s.io`.
type: string
kind:
description: 'Kind is a string value representing the REST resource
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -286,12 +286,14 @@ spec:
type: object
imageRepository:
description: ImageRepository sets the container registry
to pull images from. If empty, `k8s.gcr.io` will be
used by default; in case of kubernetes version is a
CI build (kubernetes version starts with `ci/` or `ci-cross/`)
`gcr.io/k8s-staging-ci-images` will be used as a default
for control plane components and for kube-proxy, while
`k8s.gcr.io` will be used for all the other images.
to pull images from. If empty, `k8s.gcr.io` or `registry.k8s.io`
will be used by default; in case of kubernetes version
is a CI build (kubernetes version starts with `ci/`
or `ci-cross/`) `gcr.io/k8s-staging-ci-images` will
be used as a default for control plane components and
for kube-proxy, while `k8s.gcr.io` or `registry.k8s.io`
will be used for all the other images. It will use `k8s.gcr.io`
for Kubernetes <= v1.24, else `registry.k8s.io`.
type: string
kind:
description: 'Kind is a string value representing the
Expand Down Expand Up @@ -1265,12 +1267,14 @@ spec:
type: object
imageRepository:
description: ImageRepository sets the container registry
to pull images from. If empty, `k8s.gcr.io` will be
used by default; in case of kubernetes version is a
CI build (kubernetes version starts with `ci/` or `ci-cross/`)
`gcr.io/k8s-staging-ci-images` will be used as a default
for control plane components and for kube-proxy, while
`k8s.gcr.io` will be used for all the other images.
to pull images from. If empty, `k8s.gcr.io` or `registry.k8s.io`
will be used by default; in case of kubernetes version
is a CI build (kubernetes version starts with `ci/`
or `ci-cross/`) `gcr.io/k8s-staging-ci-images` will
be used as a default for control plane components and
for kube-proxy, while `k8s.gcr.io` or `registry.k8s.io`
will be used for all the other images. It will use `k8s.gcr.io`
for Kubernetes <= v1.24, else `registry.k8s.io`.
type: string
kind:
description: 'Kind is a string value representing the
Expand Down Expand Up @@ -2246,12 +2250,14 @@ spec:
type: object
imageRepository:
description: ImageRepository sets the container registry
to pull images from. If empty, `k8s.gcr.io` will be
used by default; in case of kubernetes version is a
CI build (kubernetes version starts with `ci/` or `ci-cross/`)
`gcr.io/k8s-staging-ci-images` will be used as a default
for control plane components and for kube-proxy, while
`k8s.gcr.io` will be used for all the other images.
to pull images from. If empty, `k8s.gcr.io` or `registry.k8s.io`
will be used by default; in case of kubernetes version
is a CI build (kubernetes version starts with `ci/`
or `ci-cross/`) `gcr.io/k8s-staging-ci-images` will
be used as a default for control plane components and
for kube-proxy, while `k8s.gcr.io` or `registry.k8s.io`
will be used for all the other images. It will use `k8s.gcr.io`
for Kubernetes <= v1.24, else `registry.k8s.io`.
type: string
kind:
description: 'Kind is a string value representing the
Expand Down
5 changes: 3 additions & 2 deletions bootstrap/kubeadm/types/upstreamv1beta1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,10 @@ type ClusterConfiguration struct {
CertificatesDir string `json:"certificatesDir,omitempty"`

// ImageRepository sets the container registry to pull images from.
// If empty, `k8s.gcr.io` will be used by default; in case of kubernetes version is a CI build (kubernetes version starts with `ci/` or `ci-cross/`)
// If empty, `k8s.gcr.io` or `registry.k8s.io` will be used by default; in case of kubernetes version is a CI build (kubernetes version starts with `ci/` or `ci-cross/`)
// `gcr.io/k8s-staging-ci-images` will be used as a default for control plane components and for kube-proxy, while `k8s.gcr.io`
// will be used for all the other images.
// or `registry.k8s.io` will be used for all the other images.
// It will use `k8s.gcr.io` for Kubernetes <= v1.24, else `registry.k8s.io`.
// +optional
ImageRepository string `json:"imageRepository,omitempty"`

Expand Down
5 changes: 3 additions & 2 deletions bootstrap/kubeadm/types/upstreamv1beta2/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,10 @@ type ClusterConfiguration struct {
CertificatesDir string `json:"certificatesDir,omitempty"`

// ImageRepository sets the container registry to pull images from.
// If empty, `k8s.gcr.io` will be used by default; in case of kubernetes version is a CI build (kubernetes version starts with `ci/` or `ci-cross/`)
// If empty, `k8s.gcr.io` or `registry.k8s.io` will be used by default; in case of kubernetes version is a CI build (kubernetes version starts with `ci/` or `ci-cross/`)
// `gcr.io/k8s-staging-ci-images` will be used as a default for control plane components and for kube-proxy, while `k8s.gcr.io`
// will be used for all the other images.
// or `registry.k8s.io` will be used for all the other images.
// It will use `k8s.gcr.io` for Kubernetes <= v1.24, else `registry.k8s.io`.
// +optional
ImageRepository string `json:"imageRepository,omitempty"`

Expand Down
5 changes: 3 additions & 2 deletions bootstrap/kubeadm/types/upstreamv1beta3/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,10 @@ type ClusterConfiguration struct {
CertificatesDir string `json:"certificatesDir,omitempty"`

// ImageRepository sets the container registry to pull images from.
// If empty, `k8s.gcr.io` will be used by default; in case of kubernetes version is a CI build (kubernetes version starts with `ci/` or `ci-cross/`)
// If empty, `k8s.gcr.io` or `registry.k8s.io` will be used by default; in case of kubernetes version is a CI build (kubernetes version starts with `ci/` or `ci-cross/`)
// `gcr.io/k8s-staging-ci-images` will be used as a default for control plane components and for kube-proxy, while `k8s.gcr.io`
// will be used for all the other images.
// or `registry.k8s.io` will be used for all the other images.
// It will use `k8s.gcr.io` for Kubernetes <= v1.24, else `registry.k8s.io`.
// +optional
ImageRepository string `json:"imageRepository,omitempty"`

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -346,12 +346,13 @@ spec:
type: object
imageRepository:
description: ImageRepository sets the container registry to
pull images from. If empty, `k8s.gcr.io` will be used by
default; in case of kubernetes version is a CI build (kubernetes
version starts with `ci/` or `ci-cross/`) `gcr.io/k8s-staging-ci-images`
will be used as a default for control plane components and
for kube-proxy, while `k8s.gcr.io` will be used for all
the other images.
pull images from. If empty, `k8s.gcr.io` or `registry.k8s.io`
will be used by default; in case of kubernetes version is
a CI build (kubernetes version starts with `ci/` or `ci-cross/`)
`gcr.io/k8s-staging-ci-images` will be used as a default
for control plane components and for kube-proxy, while `k8s.gcr.io`
or `registry.k8s.io` will be used for all the other images.
It will use `k8s.gcr.io` for Kubernetes <= v1.24, else `registry.k8s.io`.
type: string
kind:
description: 'Kind is a string value representing the REST
Expand Down Expand Up @@ -1482,12 +1483,13 @@ spec:
type: object
imageRepository:
description: ImageRepository sets the container registry to
pull images from. If empty, `k8s.gcr.io` will be used by
default; in case of kubernetes version is a CI build (kubernetes
version starts with `ci/` or `ci-cross/`) `gcr.io/k8s-staging-ci-images`
will be used as a default for control plane components and
for kube-proxy, while `k8s.gcr.io` will be used for all
the other images.
pull images from. If empty, `k8s.gcr.io` or `registry.k8s.io`
will be used by default; in case of kubernetes version is
a CI build (kubernetes version starts with `ci/` or `ci-cross/`)
`gcr.io/k8s-staging-ci-images` will be used as a default
for control plane components and for kube-proxy, while `k8s.gcr.io`
or `registry.k8s.io` will be used for all the other images.
It will use `k8s.gcr.io` for Kubernetes <= v1.24, else `registry.k8s.io`.
type: string
kind:
description: 'Kind is a string value representing the REST
Expand Down Expand Up @@ -2702,12 +2704,13 @@ spec:
type: object
imageRepository:
description: ImageRepository sets the container registry to
pull images from. If empty, `k8s.gcr.io` will be used by
default; in case of kubernetes version is a CI build (kubernetes
version starts with `ci/` or `ci-cross/`) `gcr.io/k8s-staging-ci-images`
will be used as a default for control plane components and
for kube-proxy, while `k8s.gcr.io` will be used for all
the other images.
pull images from. If empty, `k8s.gcr.io` or `registry.k8s.io`
will be used by default; in case of kubernetes version is
a CI build (kubernetes version starts with `ci/` or `ci-cross/`)
`gcr.io/k8s-staging-ci-images` will be used as a default
for control plane components and for kube-proxy, while `k8s.gcr.io`
or `registry.k8s.io` will be used for all the other images.
It will use `k8s.gcr.io` for Kubernetes <= v1.24, else `registry.k8s.io`.
type: string
kind:
description: 'Kind is a string value representing the REST
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -304,13 +304,14 @@ spec:
type: object
imageRepository:
description: ImageRepository sets the container registry
to pull images from. If empty, `k8s.gcr.io` will
be used by default; in case of kubernetes version
to pull images from. If empty, `k8s.gcr.io` or `registry.k8s.io`
will be used by default; in case of kubernetes version
is a CI build (kubernetes version starts with `ci/`
or `ci-cross/`) `gcr.io/k8s-staging-ci-images` will
be used as a default for control plane components
and for kube-proxy, while `k8s.gcr.io` will be used
for all the other images.
and for kube-proxy, while `k8s.gcr.io` or `registry.k8s.io`
will be used for all the other images. It will use
`k8s.gcr.io` for Kubernetes <= v1.24, else `registry.k8s.io`.
type: string
kind:
description: 'Kind is a string value representing
Expand Down Expand Up @@ -1467,13 +1468,14 @@ spec:
type: object
imageRepository:
description: ImageRepository sets the container registry
to pull images from. If empty, `k8s.gcr.io` will
be used by default; in case of kubernetes version
to pull images from. If empty, `k8s.gcr.io` or `registry.k8s.io`
will be used by default; in case of kubernetes version
is a CI build (kubernetes version starts with `ci/`
or `ci-cross/`) `gcr.io/k8s-staging-ci-images` will
be used as a default for control plane components
and for kube-proxy, while `k8s.gcr.io` will be used
for all the other images.
and for kube-proxy, while `k8s.gcr.io` or `registry.k8s.io`
will be used for all the other images. It will use
`k8s.gcr.io` for Kubernetes <= v1.24, else `registry.k8s.io`.
type: string
kind:
description: 'Kind is a string value representing
Expand Down
Loading

0 comments on commit 35f801c

Please sign in to comment.